Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the process of configuring the hot loading tool devtools by SpringBoot

Shulou Source: shulou.com Published: 2022-06-03 08:56:25 11月15日 Update

How does SpringBoot configure the hot loading tool devtools? aiming at this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

1. Introduction to the principle of devtools

Spring-boot-devtools is a hot load toolkit provided by spring for developers. The main principle is to use two ClassLoader class loaders, one Classloader loads those classes that will not change (a third-party Jar package), and the other ClassLoader loads classes that will change, called restart ClassLoader, so that when the personal code changes, the original restart ClassLoader is released, and then recreate a restart ClassLoader, because there are relatively few classes to load, so speed up the application restart time.

2. Hot load configuration step 2. 1 introduces devtools dependency org.springframework.boot spring-boot-devtools true 2.2 IDEA configuration a. Run-time compilation configuration

The Shift+Ctrl+Alt+/ key combination opens the dialog box to select the Registry option, and then check the "compiler.automake.allow.when.app.running" function: allow automatic compilation, even if the development application is currently running. Note that automatic startup may eventually remove classes required by some applications.

b. Automatic compilation and configuration

"File"-> "Settings"-> "Build,Execution,Deplyment"-> "Compiler", select Build project automatically

Description: IDEA development tools for code file editing is automatically saved, if this option is enabled. Any small changes will be reloaded. It is recommended to use keyboard shortcuts to load.

The answer to the question about the process of configuring the hot loading tool devtools by SpringBoot is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Tags: Configuration tools problems applications development compilation procedures code principles applications more programs help solutions run easy easy two personal role Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia macOS Microsoft Shulou Information Shulou Tech Info