IDEA中创建个web项目,项目中没有resources资源文件

小编在创建web项目,项目中没有resources资源文件。

可以看到根本没有resources资源文件,但是又用到,怎么办?
我们在web.xml中会用到:没有resources资源文件,报红色的波浪线。
<context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>classpath:applicationContext.xml</param-value>
</context-param>

查看原因:Cannot resolve file 'applicationContext.xml' less... (Ctrl+F1) Inspection info: Highlights unresolved file references in XML.

解决问题:1.创建resources资源包。

1.点击file-->Project Structure-->Modules

创建好resources资源文件后,点击Resources,之后resources就变成resources

Apply--ok! 这样就好了。wel.xml也不会报红线了。

猜你喜欢

转载自blog.csdn.net/qq_40615403/article/details/85328261