Spring Boot five kinds of hot deployment

1, the module hot deployment

        In SpringBoot, the template engine page cache is enabled by default, if you modify the content of the page, then refresh the page is not modified page, so we can close the template engine cache in application.properties as follows:

        Thymeleaf configuration:

spring.thymeleaf.cache=false

        FreeMarker configuration:

spring.freemarker.cache=false  

        Groovy configuration:

spring.groovy.template.cache=false

        Velocity configuration:

spring.velocity.cache=false

2, using the debug mode Debug achieve hot deployment

This way is the easiest and quickest way to deploy a hot, use Debug mode when running the system without having to install any plug-ins, but no hair on the configuration file, change the method name, class, and method for increasing the hot-deploy, use of limited.

3、spring-boot-devtools

        Add spring-boot-devtools can be realized dependent code pages and hot deployment in Spring Boot project. as follows:

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

It features such a way that the role of a wide range of systems, including any changes to modify the configuration file, change the name of the method can cover, but the consequences are very clear, it is using file restarts after a change in strategy to achieve, mainly to save us manually click restart time, improve effectiveness, and back on the experience somewhat less.

spring-boot-devtools stencil buffer turned off by default, if used separately arranged in this way do not close the stencil buffer.

4、Spring Loaded

This way and Debug mode is similar to a limited scope, but does not depend on Debug mode is activated, start by Spring Loaded library, you can perform real-time thermal deployed in the normal mode. This needs to be configured at run confrgration in.

5, JRebel

Jrebel Java developers the best hot deployment tools, Spring Boot provides excellent support, JRebel is billing software, trial period of 14 days. It can be installed directly through plug-ins.

 

Original Address: https: //my.oschina.net/ruoli/blog/1590148

Guess you like

Origin www.cnblogs.com/fly520/p/11984083.html