Spring在EAR之外找不到jar - WebSphere社区版

时间:2012-11-07 17:41:44

标签: spring shared-libraries geronimo websphere-ce

我已将部署到WebSphere Application Server Community Edition,它使用spring加载不同的接口。为了生产,所有这些课程都装在耳朵里。我正试图在EAR之外的jar中用另一个类覆盖这些类。

我将我的jar放在/ var / shared / lib中并且有一个部署依赖项,我认为这些文件夹包含在类路径中:

<sys:dependencies>
<sys:dependency>
<sys:groupId>org.apache.geronimo.configs</sys:groupId>
<sys:artifactId>sharedlib</sys:artifactId>
</sys:dependency>
</sys:dependencies>

我错过了什么?弹簧导致NoClassDef声明无法找到类。

1 个答案:

答案 0 :(得分:0)

Websphere具有共享库功能。在共享库中添加jar,然后在websphere管理控制台中的应用程序中添加该库。

Using shared libraries at the application level
To define a shared library named VersionCheckerV2_SharedLib and associate it 
to our ClassloaderTest application, do the following steps:
1. In the administrative console, select Environment → Shared Libraries.
2. Select the scope at which you want this shared library to be defined, such as 
Cell, and click New

添加

Select Applications → Application Types→ WebSphere enterprise 
applications.
6. Select the ClassloadersExample application.
7. In References, select Shared library references.
8. Select AppName in the Application row.
9. Click Reference shared libraries.
10.Select the VersionCheckerV2_SharedLib and click the >> button to move it 
to the Selected column

使用shared library执行此任务。使用this book作为指导。