Extending Java Web Applications with plugins

后端 未结 8 1108
一向
一向 2021-02-09 14:10

I have this web application that has grown to an unmanageable mess.

I want to split it into a common \"framework\" part (that still includes web stuff like pages and im

8条回答
  •  感情败类
    2021-02-09 15:09

    There actually is nothing better than OSGI if you are thinking about splitting application into separate modules. Take a look at Greenpages example. You can create a parent module (core) where you include jars that your application need.

    If you know something about component programming, you will soon find out that OSGI modules behave like interfaces, where you have to expose what you will use in other modules. It is quite simple once you understand. Anyway it also can be really painful when you learn how to use OSGI. We had problems using JSON, as a version of Jackson that we added as jar to the module, was overridden by other jar that was contained in the Spring core modules. You always have to double check what version of jar is loaded for your needs.

    Unfortunately even OSGI approach does not solve what we are searching for. How to extend a persistent model and existing forms in runtime.

提交回复
热议问题