如果使用jsp文件,需要在配置文件中配置resources项,才能让idea识别这个jsp文件
没有添加这一项在编译后的.class文件中的结构目录是这样子的
添加上这一个配置项,在class配置文件中的位置是这样子的:
添加的配置文件是这样子的:
<resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> <resource> <directory>src/main/resource</directory> <includes> <include>**/*.*</include> </includes> </resource> <resource> <directory>src/main/webapp</directory> <targetPath>MFTA-INF/resources</targetPath> <includes> <include>**/*.*</include> </includes> </resource> </resources>
本文来自博客园,作者:King-DA,转载请注明原文链接:https://www.cnblogs.com/qingmuchuanqi48/p/11966206.html