不多说,直接上代码
<context-param>
<param-name>contextConfigLocation </param-name>
<param-value>/WEB-INF/spring/AppContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>App</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation </param-name>
<param-value>/WEB-INF/spring/AppContext.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
这样子程序没问题可以跑。但是AppContext.xml加载了两遍。求高手解决下
慕森卡
婷婷同学_
慕尼黑5688855
宝慕林4294392
相关分类