开发者

spring application contexts

开发者 https://www.devze.com 2023-03-18 04:33 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消