在Weblogic 12c中覆盖Spring jar [英] Override Spring jar in Weblogic 12c

查看:298
本文介绍了在Weblogic 12c中覆盖Spring jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在覆盖Weblogic 12c中的Spring jar时,我们一直面临一个问题。基本上,我们需要基于一些调用它们的接口的第三方API编写一个bean。现在他们使用Spring 2.5 jar来实现自己的实现。由于Weblogic本质上支持Spring 3.0 jar。结果,当我们编写包装它们的接口的bean并部署它时,它不起作用。我们通过在本地环境中用Spring 3替换Spring 2.5 jar来复制该问题。

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.

如果我们修改服务器类路径以加载Spring 2.5 jar(在Spring 3.0之前),则整个soa-infra应用程序出现故障,那么我们想知道是否有可能仅对我们的应用程序本身覆盖Spring jar?在加载应用程序时,它将在应用程序上下文中使用Spring 2.5覆盖Spring 3.0 jar,但是服务器将继续使用Spring 3.0?

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!

谢谢,
Bhaskar

Thanks, Bhaskar

推荐答案

尝试使用Preferred-Application -打包在您的weblogic.xml文件中。

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>

这篇关于在Weblogic 12c中覆盖Spring jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆