简体   繁体   English

在 Eclipse RCP 项目中使用 Spring 应用程序上下文的推荐方法

[英]A recommended way to use Spring application context within Eclipse RCP project

what would be a recommended way to work with Spring application context within Eclipse RCP project.在 Eclipse RCP 项目中使用 Spring 应用程序上下文的推荐方法是什么。

I have a Swing based application that is wired together by Spring and its configurations.我有一个基于 Swing 的应用程序,它由 Spring 及其配置连接在一起。 What would be the best strategy for these two, without too many conflicts between them (I'm just beginning with Eclipse RCP, and I am mostly worried about how similarly eclipse plugin.xml looks in comparison with xxx-context.xml. What would be the best strategy for these two, without too many conflicts between them (I'm just beginning with Eclipse RCP, and I am mostly worried about how similarly eclipse plugin.xml looks in comparison with xxx-context.xml.

Thank you for help.谢谢你的帮助。

I think the best way to use Spring in Eclipse RCP project is to use it with Spring Dynamic Modules.我认为在 Eclipse RCP 项目中使用 Spring 的最佳方法是将其与 Spring 动态模块一起使用。 I define beans in diffrent contexts over the plugins and export some of them as osgi services to allow beans from other plugins use them in dependency injection.我在插件的不同上下文中定义 bean,并将其中一些导出为 osgi 服务,以允许来自其他插件的 bean 在依赖注入中使用它们。 Also I implemented some kind of ServiceAccessor (singleton wrapper over osgi service accessor) that displays "waiting services to be registered" dialog to user until all necessary services will be registered.我还实现了某种 ServiceAccessor(osgi 服务访问器上的单一包装器),它向用户显示“等待服务注册”对话框,直到注册所有必要的服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM