配置devtools

配置devtools

1. 配置pom.xml

  <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <scope>runtime</scope>
      <optional>true</optional>
  </dependency>

  <build>
      <plugins>
          <plugin>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-maven-plugin</artifactId>
              <configuration>
                  <fork>true</fork>
                  <addResources>true</addResources>
              </configuration>
          </plugin>
      </plugins>
  </build>

2. 修改IDEA设置

  1. 打开setting——build——compiler,勾选红框中的内容,保存修改。
setting
  1. 使用快捷键ctrl + shift + alt + /打开Registry设定窗口,勾选红框中的内容,保存修改。
registry
  1. 关闭并重新打开IDEA

end

posted @ 2022-10-28 15:25  baixz  阅读(61)  评论(0)    收藏  举报