Search code examples
springpackagingear

Where should I keep the Spring applicationContext.xml in an EAR


I have service classes which are deployed in an EAR with no WAR or Web apps. In what folder structure should I ideally store the applicationContext.xml?

Currently we load it as

Resource res = new ClassPathResource("META-INF/applicationContext.xml");

Solution

  • That's as good a place as any. It doesn't really matter, and I'm not aware of any convention for this.