欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

web.xml 配置 contextConfigLocation(多个Spring配置文件)

程序员文章站 2023-12-24 19:22:15
...

web.xml 配置 contextConfigLocation(多个Spring配置文件)

 

<context-param>  
<param-name>contextConfigLocation</param-name>  
<param-value>WEB-INF/applicationContext*.xml</param-value>  
</context-param>  

<context-param>   
<param-name>contextConfigLocation</param-name>   
<param-value>classpath:/spring/applicationContext-*.xml</param-value>   
</context-param> 

多个配置文件中间用,隔开

<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:application-context.xml,classpath:application-others.xml</param-value>
</context-param>

 

上一篇:

下一篇: