简体   繁体   中英

How should I build a modularized enterprise application which must use Spring and JPA?

I'm planning to build a Java-based system to handle different business processes where each of these is a particular module in the system. Most modules would depend on some of the other modules to handle their particular business process. In other words, top modules would consume some sort of basic services provided by underlying modules. Some modules will be developed from the very beginning, but some will be added to the system later. Next, some modules will expose RESTful interfaces to handle external input / output.

To handle all this, OSGi seems appropriate, but it's a bit difficult to learn with all the different "distributions" out there (Equinox, Felix, etc.) and I'm concerned about the ease of using the Spring framework and other 3rd party libraries within each module (starting with Spring 3.2 the different jars might not come with OSGi manifests).

On top of this, I'd like a central web portal to administer all bundles, thus with each new bundle there will be a new admin section.

这就是为什么我们为Spring开发了无操作系统的模块化https://github.com/griddynamics/banshun的原因感谢您的反馈!

Why do you need OSGi? Why not use a Web Server like Tomcat, and deploy your application as a war? You can deploy it on multiple servers in a cluster, and your application can scale on and on.

Why do you need Spring? It has become incredibly coupled. And it has a complexity that find quite useless since OSGi applications tend to be built from small components communicating through services; voiding most of the advantages of the Spring wiring model which assumes it is central.

And hard to configure is a strange remark, OSGi is excellent configuration support. It is just different than what you're used to.

为什么不使用OSGi Blueprint,而不是使用spring,它将为您提供从Spring到OSGi的“轻松”过渡。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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