In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
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.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.