Springboot高级(七)热部署

1、在pom.xml文件中引入jar包

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

2、application.yml文件修改配置

spring:
  devtools:
    restart:
      enabled: true 
      additional-paths: src/main/java  
      exclude: WEB-INF/**

3、修改IDEA

(1)File→ Settings→ Compiler→ Build Project automatically
(2)ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running

猜你喜欢

转载自blog.csdn.net/qq_38618691/article/details/117786992