Sharing an application context between two WARs?

前端 未结 7 1179
执笔经年
执笔经年 2020-12-30 08:26

Is there a way to share an app-context between two deployed wars? One war needs to wire-in the services of another, and I don\'t know where to start with this.

7条回答
  •  青春惊慌失措
    2020-12-30 08:43

    Do you need to share the runtime context, or do you want to just re-use bean definitions across the two applications?

    If it is only the latter then you could easily extract the common Spring context XML files into some shared dependency, and just re-use the JAR across the two webapps. However if you need the beans/services in each application to talk to each other, you need a different option.

提交回复
热议问题