热部署Devtools


热部署Devtools

热部署的作用,方便代码修改,在代码修改后,无需再次重新运行代码。

  1. pom文件配置maven的jar包

    org.springframework.boot
    spring-boot-devtools
    runtime
    true

  1. Adding plugin to your pom.xml

    
        你自己的工程名字
        
            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    true
                    true
                
            
        
    
    
  2. 设置自动编译

  1. 在pom.xml下设置Registry自动编译

  1. 最后重启Idea