Override Spring jar in Weblogic 12c

让人想犯罪 __ 提交于 2019-12-25 08:48:42

问题


We have been facing an issue while overriding the Spring jar in Weblogic 12c. Basically we need to write a bean based on some 3rd party API calling their interfaces. Now they use Spring 2.5 jar for their own implementation. Since Weblogic inherently supports Spring 3.0 jar. As a result when we write our bean wrapping their interfaces and deploy it, it doesn't work. We replicated the issue by replacing Spring 2.5 jar with Spring 3 in local environment.

If we modify the server classpath to load the Spring 2.5 jar (preceding Spring 3.0), entire soa-infra application goes down, so what We wanted to know if it is possible to override the Spring jar only for our application itself? While loading the application it will override the Spring 3.0 jar with Spring 2.5 in the application context but server will keep using Spring 3.0?

Any ideas/suggestions highly appreciated!

Thanks, Bhaskar


回答1:


Try using prefer-application-packages in your weblogic.xml file.

<container-descriptor>
     <prefer-application-packages>
        <package-name>org.springframework</package-name>
     <prefer-application-packages>
</container-descriptor>


来源:https://stackoverflow.com/questions/29350631/override-spring-jar-in-weblogic-12c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!