spring-4.3.16+xfire-spring-1.2.6版本升級


最近爆了個spring的漏洞,然后公司整體要求升級spring到最新版本,然后搞四了一大批猿人。

spring-4.*的最新版本是4.3.16(穩定版)

xfire-spring-1.2.6(最新版-已經停止維護了-后續建議不要再使用了

 

進入正題(主要修改的東西有二步):

注:可以去下載xfire-spring-1.2.6的源碼或者反編譯,問題主要是修改xml配置文檔,無需重新編譯的。

 

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

singleton="false" 修改為 scope="prototype"

 

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">
      <map>
<!-- 使用這一行即可 --> <entry key="org.codehaus.xfire.service.ServiceFactory" value="org.codehaus.xfire.spring.editors.ServiceFactoryEditor"></entry> <!-- <entry key="org.codehaus.xfire.service.ServiceFactory"> --> <!-- <bean class="org.codehaus.xfire.spring.editors.ServiceFactoryEditor"> --> <!-- <property name="transportManager" ref="xfire.transportManager" /> --> <!-- </bean> --> <!-- </entry> --> </map> </property> </bean>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM