idea之resource配置

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做下图操作

 

posted @ 2016-09-13 13:24  code.world  Views(7452)  Comments(0Edit  收藏  举报