Hot swapping in Spring Boot

前端 未结 12 1603
别那么骄傲
别那么骄傲 2020-11-29 03:41

I\'ve been doing a P.O.C with Spring Boot.

So far it\'s been going really good and promising, but there\'s one major drawback: I\'m using an embedded server (i.e.,

12条回答
  •  天命终不由人
    2020-11-29 03:54

    If you're using maven, the spring-boot-maven-plugin in your pom.xml needs to be like this to get the hot swap:

      
            org.springframework.boot
            spring-boot-maven-plugin
            
                
                    org.springframework
                    springloaded
                    1.2.0.RELEASE
                
            
        
    

    and if you're using thymeleaf, add this to your application properties:

    spring.thymeleaf.cache=false
    

    But remember something: Don't use this in your production environment..

提交回复
热议问题