zoukankan      html  css  js  c++  java
  • struts2 与spring整合

    要把struts2的action交给spring管理,这样spring才干帮struts2注入须要的的bean(一開始action是由struts初始化,所以想注入spring里面的bean是注入不了的)
    struts2 的filter生成action的时候由spring管理
    struts2向spring要action
    struts2是主导(struts2有个插件,要action的时候向这个插件要)
    struts2向spring要。你帮我把action初始化,spring帮strus产生action,所以想注入就注入


    1 要把beans.xml配置到web.xml  让application一启动就载入beans,用listener
    2 把action交给spring管理 增加struts-spring  jar包

  • 相关阅读:
    wkhtmktopdf
    linux命令行抓取网页快照
    ubuntu 固定静态IP
    $http questions
    generate_scripts
    network
    IT_Qestion
    day03
    day02
    day01
  • 原文地址:https://www.cnblogs.com/mthoutai/p/6905636.html
Copyright © 2011-2022 走看看