Hello to all. How i can to configure an ApplicationContext (may be ClassPathXmlApplicationContext?) if the configuration file (applicationContext.xml) is in a jar file within the classpath but outside the ear?
Hello to all. How i can to configure an ApplicationContext (may be ClassPathXmlApplicationContext?) if the configuration file (applicationContext.xml) is in a jar file within the classpath but outside the ear?
You can use the classpath: prefix to tell Spring to load from the classpath. ClassPathXmlApplicationContext loads from the classpath anyway, but the classpath: prefix also works in WebApplicationContext implementations.
Normally EARs should be self-contained: that's the intent of the J2EE spec. However, to meet one unusual requirement I used the classpath: mechanism to load a config file in a JAR on the Tomcat shared classpath; it works fine.
ok, i will try with this, thanksOriginally Posted by Rod Johnson
Yes, i agree with you. In jar we have configuration files of services. We have separated jar of ear for being able to modify the configuration files and that the services are reshaped.Originally Posted by Rod Johnson
Thanks for your time, and excuse me for my english.