【打war包到远程的tomcat上运行,但是打的war包没有把静态资源打进去 _jetty/tomcat 】 | IT修真院·坑乎
问题已收录 打war包到远程的tomcat上运行,但是打的war包没有把静态资源打进去
我也踩过这个坑( 2 )
已统计您的踩坑,无需重复点击
回答(1)
jetty/tomcat
详细描述
错误截图
编辑于2024-11-22
  • [郑州|结业弟子]JAVA-张强
    0

    在pom文件里配置resources路径:

    <resources>
    <resource>
    <directory>src/main/java</directory>
    <!--<targetPath>WEB-INF/classes</targetPath>-->
       <includes>
    <include>**/*.properties</include>
    <include>**/*.xml</include>
    </includes>
    <!-- 是否替换资源中的属性-->
       <!--<filtering>true</filtering>-->
     </resource>
    <resource>
    <directory>src/main/resources</directory>
    <includes>
    <include>**/*.properties</include>
    <include>**/*.xml</include>
    <include>**/*</include>
    </includes>
    </resource>
    </resources>


    编辑于2018-05-17