如何首先加载位于Java EE app libs中的类,而不是Java EE App Container提供的类

Ole*_*_DJ 6 websphere java-ee websphere-8

我们将在开发中使用WebSphere 8.0 app服务器.
我们的Web应用程序使用Amazon aws java sdk,它依次使用Apache http-client 4.1.
但是WebSphere的库中也有http-client类,它们似乎与我们的web-app中的http-client冲突.
我找到了随WebSphere一起分发的下一个http-client类列表:

\ WebSphere\AppServer\plugins\com.ibm.ws.prereq.jaxrs.jar(http-client 4.0.1)
\WebSphere\AppServer\runtimes\com.ibm.jaxrs.thinclient_8.0.0.jar

所以,我的问题是:如何首先加载位于我的应用程序中的类而不是WebSphere app容器提供的类?

tri*_*lef 7

从管理控制台转到:

应用程序> Websphere企业应用程序> YourApplication>管理模块> YourModule

并将" 类加载器顺序 "更改为父.

然后重启应用程序.