spring application contexts
i have a maven project that consist of three modules . model , cor , web . both model and core have their own application contexts , and i want to import them in my web project . i added this part to web.xml :
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:applicationContext-*.xml
</param-value>
</context-p开发者_高级运维aram>
when i deploy the project on tomcat , spring cant find any of application contexts . i have to note that i dont get any exceptions . but when i copy all application contextes on somewhere like WEB-INF/spring and point contextConfigLocation to it , everything works. what is the problem?
I would advise another thing. Use <import ... />
in your main applicationContext.xml
to import the two additional ones.
精彩评论