Tuesday, May 03, 2005

previously i was using this format for loading my spring context files:

String configFiles[] = {"/applicationContext-orm.xml", "/applicationContext-manager.xml",

these require that you copy the context files to your webapps WEB-INF/ directory.

but if you want to carry it around your jar for convenience you can also use the classpath syntax:

String configFiles[] = {"classpath:applicationContext-orm.xml", "classpath:applicationContext-manager.xml",

this is relative to your jar's classpath.

No comments: