Skip to content

kknd22/one-ear-multiple-wars-share-spring-contexts

Repository files navigation

one-ear-multiple-wars-share-spring-contexts

inside one ear many war share the common spring context

reference: http://imranbohoran.blogspot.com/2011/02/multiple-web-applications-one-spring.html http://spring.io/blog/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-spring-application/

Task List:

  1. modify web.xml war add: locatorFactorySelector classpath:common-beans.xml

  2. in common-beans.xml

    services-context1.xml services-context2.xml ... services-contextN.xml
    1. if use servlet 3 spring, in WebApplicationInitializer use sc.setInitParameter("parentContextKey", "ear.context"); sc.setInitParameter("locatorFactorySelector", "classpath:common-beans.xml");

About

inside one ear many war share the common spring context

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages