spring-4+xfire-spring-1.2.6 访问报错

xfire-spring-1.2.6因已停止维护,建议升级到cxf。在spring-4中,'singleton'属性不再支持,需在xfire.xml和xfireXmlBeans.xml中将'singleton="false"'改为'scope="prototype"', 'singleton="true"'改为'scope="singleton"'.此外,'ServiceFactoryEditor'转换问题需在customEditors.xml中调整配置。" 43833413,1176802,理解持久类为何实现序列化,"['Java', 'ORM框架', '持久化', '序列化接口', '数据传输']
摘要由CSDN通过智能技术生成

xfire-spring-1.2.6(最新版-已经停止维护了-后续建议使用cxf,xfire是cxf前世)

进入正题(主要修改的东西有二步):
1、异常:Configuration problem: Old 1.x 'singleton' attribute in use - upgrade to 'scope

原因:spring-4.*不支持singleton=false写法了。

处理:找到下面配置文件

org/codehaus/xfire/spring/xfire.xml

org/codehaus/xfire/spring/xfireXmlBeans.xml

就在xfire-spring-1.2.6.jar架包里面,你直接用压缩包打开,找到这两个xml 进行修改保存就可以。

singleton="false" 修改为 scope="prototype"
singleton="true" 修改为  scope="singleton"

我当时把singleton="true"修改成scope="prototype",部署的时候不报错,但是访问不到接口,一定要注意。

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

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

处理:找到下面配置文件

org/codehaus/xfire/spring

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值