在 Eclipse RCP 中使用 Spring 3.x AnnotationConfigApplicationContext
我有一个使用 Spring 连接的基于服务器的组件。我有一个客户端接口,也使用 Spring 连接到服务器。我需要从 Eclipse RCP 应用程序连接到服务器。
我已将所需的 spring 库包含在我的目标平台中。
但是,当我尝试创建 Spring 上下文时,我在“net.sf.cglib.proxy.Enhancer”上收到 ClassNotFoundException,这会导致抛出 IllegalStateException。
我已手动将 cglib 2.2 包装在插件中并将其添加到我的目标平台,但它仍然引发相同的错误。
如何确保 Spring 模块可以访问 CGLib?
I have a server based component wired up using Spring. I have a client interface that also uses Spring to connect to the server. I need to connect to the server from an Eclipse RCP application.
I have included the required spring libraries in my target platform.
However, when I try to create the Spring context, I get a ClassNotFoundException on "net.sf.cglib.proxy.Enhancer" which results in an IllegalStateException being thrown.
I have manually wrapped cglib 2.2 in a plugin and added that to my target platform, but it still throws the same error.
How do I ensure the Spring modules have access to CGLib?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过创建一个包含 Spring 和所有必需依赖项的单独包解决了这个问题。然后,我必须在客户端代码和 spring 包之间添加 Eclipse-Buddy 类加载,以便它可以加载我的配置类。
有更好的办法吗?
I resolved this in by creating a separate bundle containing Spring and all the required dependencies. I then had to add Eclipse-Buddy classloading between my client code and the spring bundle so that it could load my config classes.
Is there a better way?