1、問題
在idea中配置springmvc項目,用hibernate管理數據庫,在web.xml中作如下配置:
<!--配置hibernate數據庫連接-->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
此時<param-value>classpath:applicationContext.xml</param-value>報紅,啟動項目匯報錯。
2、解決方案
找到file----Project Structure做下圖操作

