SpringBoot hot deployment Development

During the development phase, the program needs to constantly changes, and then restart the test again, so repeatedly wasted a lot of time on the waiting started. Spring Boot provides a module called spring-boot-devtools to make the application supports hot deployment and improve development efficiency of the developer, without having to manually restart the Spring Boot application.

If the selection of development tools Eclipse, dependent on spring-boot-devtools is introduced to, the following explanation for the conduct at IDEA:

1, the introduction of spring-boot-devtools module dependencies

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

 

2, set the relevant configuration automatically compiled IDEA (Eclipse itself will be rebuilt to modify default compiler, rather than IDEA)

IDEA Click: File -> Setting -> Builde, Execution, Deployment -> Complier, then check Build project automotically

 

 Use the shortcut volume Ctrl + Shift + A, enter the Registry, select the first item, enter the Registry interface, check be found on compiler.automake.allow.when.app.running options

 

 

 

 3, additional case

Sometimes Once set, the project is automatically compiled build or problems, encountered such a problem Error: Kotlin: Output directory not specified for Module 'demo-spring-boot' production

The solution is: set up a project to compile output folder File -> Project Structure ,, set an appropriate output path, and then click Apply and close to

 

4, Application

 In Java project modifications and static files, still need some delayed reaction to deploy good, still need to be patient! ! !

 

Guess you like

Origin www.cnblogs.com/gangbalei/p/11666817.html