白天看的这则《被曝重要漏洞,波及全系版本" 》标题,深深的震撼了。目前项目中使用的还是struts2-core-2.1.7这个版本的Struts2,遍动了升级版本的想法。[url]http://struts.apache.org/[/url]登陆官网,下载2.3.15.1GA,开始升级过程
[list]
[*]拷贝核心包: struts2-json-plugin-2.3.15.1、struts2-core-2.3.15.1、struts2-convention-plugin-2.3.15.1、xwork-core-2.3.15.1、freemarker-2.3.19、ognl-3.0.6
[*]拷贝辅助包:antlr-2.7.2、aopalliance-1.0、asm-3.3、asm-commons-3.3、asm-tree-3.3、builder-0.6.2、classworlds-1.1、commons-beanutils-1.8.0、commons-chain-1.2、commons-collections-3.1、commons-digester-2.0、commons-fileupload-1.3、commons-io-2.0.1、commons-lang-2.4、commons-lang3-3.1、commons-logging-1.1.3、commons-logging-api-1.1、commons-validator-1.3.1
[*]与Spring集成:struts2-spring-plugin-2.3.15.1,并在struts.properties或struts.xml配置<constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" />,在Action可以autowire Spring的bean.
[/list]
完成后,刷新工程遍完成了升级,若使用过程中使用FilterDispatcher,控制台有如下警告,用[b]StrutsPrepareAndExecuteFilter[/b]替换即可。
[quote]***********************************************************************
* WARNING!!! *
* *
* >>> FilterDispatcher <<< is deprecated! Please use the new filters! *
* *
* This can be a source of unpredictable problems! *
* *
* Please refer to the docs for more details! *
* http://struts.apache.org/2.x/docs/webxml.html *
* *
***********************************************************************[/quote]
[list]
[*]拷贝核心包: struts2-json-plugin-2.3.15.1、struts2-core-2.3.15.1、struts2-convention-plugin-2.3.15.1、xwork-core-2.3.15.1、freemarker-2.3.19、ognl-3.0.6
[*]拷贝辅助包:antlr-2.7.2、aopalliance-1.0、asm-3.3、asm-commons-3.3、asm-tree-3.3、builder-0.6.2、classworlds-1.1、commons-beanutils-1.8.0、commons-chain-1.2、commons-collections-3.1、commons-digester-2.0、commons-fileupload-1.3、commons-io-2.0.1、commons-lang-2.4、commons-lang3-3.1、commons-logging-1.1.3、commons-logging-api-1.1、commons-validator-1.3.1
[*]与Spring集成:struts2-spring-plugin-2.3.15.1,并在struts.properties或struts.xml配置<constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" />,在Action可以autowire Spring的bean.
[/list]
完成后,刷新工程遍完成了升级,若使用过程中使用FilterDispatcher,控制台有如下警告,用[b]StrutsPrepareAndExecuteFilter[/b]替换即可。
[quote]***********************************************************************
* WARNING!!! *
* *
* >>> FilterDispatcher <<< is deprecated! Please use the new filters! *
* *
* This can be a source of unpredictable problems! *
* *
* Please refer to the docs for more details! *
* http://struts.apache.org/2.x/docs/webxml.html *
* *
***********************************************************************[/quote]