During the project development process, the project needs to be restarted every time it needs to be modified and debugged, which wastes a lot of time. The following are two common methods I compiled
Modify the startup configuration method (mainly for debug mode)
Click startup configuration = 》edit configrations…
on ‘update‘ action: Update shortcut key when the user actively performs an update: Ctrl F9
##Method 2
When the developer introduces spring-boot-devtools into the project, as long as there is a change in the classpath path, the project will automatically restart, which greatly Improved project development speed. If the developer uses Eclipse, after modifying the code and saving it, the project will automatically compile and trigger a restart. If the developer uses IntelliJ IDEA, by default, the developer needs to manually compile before triggering a restart. When compiling manually, click the Build -> Build Project menu or press the Ctrl F9 shortcut key to compile. After successful compilation, the project will be restarted. Of course, developers using IntelliJ IDEA can also configure automatic compilation of projects. Configuration steps:
1.idea starts automatic compilation
Ctrl shifter alt / =》Registry=》Check compiler.automake.allow.parallel
2.Introduce jar
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
#热部署默认会重启 spring.devtools.restart.enabled=true #添加那个目录的文件需要restart spring.devtools.restart.additional-paths=src/main/java #排除那个目录的文件不需要restart spring.devtools.restart.exclude=static/**,public/**
The above is the detailed content of Idea What are the common methods for springboot springCloud hot loading and hot debugging?. For more information, please follow other related articles on the PHP Chinese website!