struts2.3升级到2.5.33和 spring3.x 的版本号更新为 spring4.x springboot升级到2.x

struts2.3升级到2.5.33

修改web.xml将过滤器改成:不然会报错

将“<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>”

改成
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>

commons-lang3升级成3.14.0最新版本

不然会报找不到某个方法

2.3升级到2.5后,如果出现可以正常启动但是访问出现404

请在struts.xml文件中package中添加下面这
个<global-allowed-methods>regex:.*</global-allowed-methods>
注意他会提示错误这个跟顺序有关系,
你看你自己是放在第一个还是什么位置我是放在		
<global-results>下面还有会提示没有这个方法这时候要把最上面的2改成2.5了如下:
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" "http://struts.apache.org/dtds/struts-2.5.dtd">

报属性[id]无效为tag[iterator] 通过TLD

因为升级了2.5后struts2 jsp页面iterator就没有id这个属性
id改成var

日志打印报页面escape问题

1.日志打印报页面.: [11],: [0]) 属性[escape]无效为tag[property] 通过

检页面是否存在escape属性将其替换成escapeHtml

把所有 spring3.x 的版本号更新为 spring4.x

1.org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 24; Attribute “singleton” must be declared for element type "bean"问题

修改源码包:xfire-spring-1.2.6(最新版-已经停止维护了-后续建议不要再使用了)
org/codehaus/xfire/spring/xfire.xml

org/codehaus/xfire/spring/xfireXmlBeans.xml

singleton=“true” 修改为scope=“singleton”

2、异常:cannot convert value of type ‘org.codehaus.xfire.spring.editors.ServiceFactoryEditor’ to …

原因:spring-4.*的customEditors获取类型直接指定为Class,而配置默认还是缺省的。

处理:找到下面配置文件

org/codehaus/xfire/spring/customEditors.xml

<bean id="xfire.customEditorConfigurer"
    class="org.springframework.beans.factory.config.CustomEditorConfigurer">
    <property name="customEditors"
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值