java - Eclipse RCP Spring 集成错误

标签 java eclipse spring eclipse-plugin eclipse-rcp

我遇到问题,将 Spring 集成到我的 eclipse rcp 项目中。基本上,为了避免混淆,我创建了一个简单的 Hello RCP With a view,从现有的 jars(用于 spring Jars)创建了一个插件,将这个项目添加到 Hello RCP with a view 作为依赖项,我放置了 applicationContext.xml文件在我的 RCP 项目的 src 文件夹中。 当我将 applicationContext.xml 放在 src 文件夹中时,它总是抛出 FileNotFoundException。作为解决方法,我也尝试过使用绝对路径

ApplicationContext applicationContext = new FileSystemXmlApplicationContext("E:/applicationContext.xml");

Thorws ClassNotFoundException: Cannot find class with bean Name .....

对于普通的 Java 应用程序,它适用于我。我该怎么做,在 Eclipse RCP 中放置 applicationContext.xml 的位置,是否有将 spring 与 eclipse rcp 集成的简单教程。如何摆脱这个问题并在我的应用程序中使用 spring。

最佳答案

Spring DM 是一个集成 spring 和 osgi 的选项。在 osgi 中将 spring bean 公开为服务。

关于java - Eclipse RCP Spring 集成错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12491892/

相关文章:

java - 无法使用 java 注释(JSR 330 标准注释)在 TestNG 的各种类中使用 spring 依赖注入(inject)

java - JAX-WS 和 Spring 运行时建模器错误

我的 MCTS Gomoku 播放器的 Java 堆空间问题

java - 将图像添加到 JLabel,并在 GridLayout 中显示标签

eclipse - 调试、单步执行 AspectJ 编织类方法

eclipse - 收集要安装的项目时发生错误(访问被拒绝)

java - 使用注释创建原型(prototype)范围的 Spring bean?

java - 如何使用java获取DOM事件监听器

java - JUnit异常 "Object is not an instance of declaring method"

java - 如何在 Java 中复制大于 4.3 GB 的文件