解决idea spring boot项目中target中没有同步更新最新目录文件及资源

Posted 星朝

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决idea spring boot项目中target中没有同步更新最新目录文件及资源相关的知识,希望对你有一定的参考价值。

idea不像eclipse那样自动将新保存的文件或目录及其他资源更新到target目录中,必须在pom.xml中设置 

复制代码
<build>    
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource>
        </resources>
</build>
复制代码

这样maven  clean 就可以了!

 

原文地址:https://www.cnblogs.com/caiba/p/8651791.html

以上是关于解决idea spring boot项目中target中没有同步更新最新目录文件及资源的主要内容,如果未能解决你的问题,请参考以下文章

idea导入工程后,不识别spring boot项目下的application.yml

spring boot web项目在IDEA下热部署解决办法(四步搞定)

已解决:idea提示未配置 Spring Boot 配置注解处理器

spring cloud导入一个新的spring boot项目作为spring cloud的一个子模块微服务,怎么做/或者 每次导入一个新的spring boot项目,IDEA不识别子module(代

IntelliJ IDEA 中的 Spring Boot 项目在重启后停止工作

Intellij IDEA 使用Spring-boot-devTools无效解决办法