Hot reload beta
INFO
Hot reload is complex to implement and requires many compatibility scenarios. If this project helps you save development time, you might as well click . Your recognition will make more people discover it, and your support is my motivation to update. If it doesn't work, please submit
for feedback.
When writing code traditionally, you need to restart the application to take effect. Hot reload makes code changes take effect immediately without restarting the application, greatly improving iteration efficiency. It supports changes to class properties and methods (including proxy classes), Spring, Solon, MyBatis, and other mainstream frameworks. It is compatible with JDK 8, JDK 11, JDK 17, JDK 21, JDK 25, and other versions.
1. Enable hot reload
- Please disable the
Build, Execution, Deployment -> Debugger -> Async Stack Tracesconfiguration in IDEA.

- Click
Hotswap 'xxx' with DebugToolsinMore Actionsto start the application with a hot reload.

If you find it cumbersome to open More Actions every time, you can place the button in the Main Toolbar
For example, add a button on the right side as shown below:

Search for Hotswap with DebugTools. If you want to change the icon, you can also modify it below.

This will allow you to click from outside the application.

TIP
Hot reload requires a specific JDK to take effect. Please refer to JDK installation to complete JDK initialization
If the startup project prompts
DCEVM is not installed, check whether the JDK installation is correct. JDK8 Check whether the commandjava -XXaltjvm=dcevm -versioncan be output normally.
2. Trigger hot reload
Start the application in debug mode. The project outputs the following log and prints the loaded hot reload plug-in.
DebugTools: 2025-01-07 16:41:07.909 INFO [main] i.g.f.d.t.h.c.HotswapAgent 44 : open hot reload unlimited runtime class redefinition.{3.3.0}
DebugTools: 2025-01-07 16:41:08.498 INFO [main] i.g.f.d.t.h.c.c.PluginRegistry 132: Discovered plugins: [JdkPlugin, ClassInitPlugin, AnonymousClassPatch, WatchResources, HotSwapper, Proxy, Spring, Solon, Mybatis]2.1 Debug hot update
If the application is started by Debug, hot reload can be triggered by the following method, and breakpoint information can also be updated.
- Use the
Compile and Reload Modified Filesbutton in the right-click menu.

- Use the
Code changedbutton on the main file page.

2.2 Hot deployment
Hot deployment can send changes to remote applications, and it can also deploy local changes to an already attached target application.
For detailed configuration and operation steps, see Hot Deploy.
2.3 Single file remote compilation
Open the context menu in a Java source file editor or project tree, then click Remote Compile "xxx.java" to Hot Deploy. The plugin saves the current file, sends the source code to the attached target application, and the target application compiles and hot deploys it.
If the current project is connected to multiple applications, the plugin asks you to choose the target connection first. The request uses the ClassLoader currently selected on that connection card.

After hot deployment completes, the result is printed in IDEA's Run tool window. The tab title is Remote Deploy Result; when multiple applications are connected, the title also includes the application name.

TIP
- Hot reloading of changed files through hot deployment is only supported after the application is attached
- When using remote dynamic compilation, the attached application must be started through JDK, not JRE.
TIP
During hot deployment, idea may sometimes fail to obtain the latest breakpoint information. If you need to update the breakpoint in time, please use Method 1
2.4 Single XML file
Open the context menu in an XML file editor or project tree, then click Compile "xxx.xml" to target directory. The plugin saves the current XML file and writes it to the current module's compilation output directory by its relative path from the source root.

TIP
- This operation only overwrites the resource file in the compilation output directory. It does not modify the XML file in the source directory.
- The XML file must be under a project source root or resource root. Otherwise, the plugin cannot calculate the relative path to write into
target/classes. - You can also trigger XML updates by recompiling the project through Method 1.
3. In which cases can hot reload be performed
3.1 Ordinary class files
- Add new class files
- Add/modify properties/methods/inner classes in existing classes.
- Anonymous inner class
- Enumeration class
Click class file hot reload for details
Pay special attention to changes in static information
Hot reloading of static fields will cause the values initialized at compile time to overwrite the values at runtime. See click for details.
3.2 Proxy class
- Java JDK proxy class.
- Cglib proxy class.
Click proxy class hot reload for details
3.3 SpringBoot Bean
- Controller
- Service
- Component
- Repository
Click SpringBoot for details
3.4 MyBatis
Mapper (new/modified)
Xml (new/modified)
Note
MyBatis currently supports Spring environment, other situations are unknown.
Click MyBatis for details
3.5 MyBatisPlus
Entity (new/modified)
Mapper (new/modified)
Xml (new/modified)
TIP
MyBatisPlus currently supports Spring environment, other situations are unknown.
Click MyBatisPlus for details
3.6 dynamic-datasource
@DSannotation added@DSannotation modified
Click DynamicDatasource for details
3.7 HuTool
Support hutool hot reload
ReflectUtilreflection tool classBeanDescbean descriptorJSONUtiljson tool class
3.8 Gson
Support Gson toolkit hot reload
3.9 EasyExcel
Support EasyExcel hot reload
3.10 Jackson
Support Jackson hot reload
3.11 FastJson、FastJson2
Support FastJson、FastJson2 hot reload
3.12 hibernate-validator
Support hibernate-validator hot reload
3.13 Solon
Support Solon class and container hot reload
ControllerComponentConfiguration- ...
Click Solon for details
3.14 OpenFeign
Supports hot reload of OpenFeign
- Supports adding/modifying interfaces annotated with
@FeignClient
3.15 Others
Hot reload can also be used in other situations. I won’t give examples here. If it doesn’t work, please submit an issue to give feedback.
4. Disable Hot Reload Plugins
If a hot reload plugin has compatibility issues in the current project, temporarily disable the specified plugin in Settings | DebugTools | Hot Reload, then restart the application with hot reload.

Disabled Plugins writes the selected plugin names into the hot reload startup parameter disabledPlugins. During Agent initialization, plugins with matching names are skipped. This is useful for temporarily avoiding startup exceptions, class transformation exceptions, or hot reload side effects caused by a specific framework plugin.
Available plugins are grouped by type:
| Group | Plugins |
|---|---|
| Base | JdkPlugin, Class, Proxy, HotSwapper, WatchResources |
| Third Party | Spring, Feign, MyBatis, Solon |
| Other | IntelliJIdea, HibernateValidator, EasyExcel, Gson, FastJson, HuTool |
WARNING
- This configuration only affects applications started with hot reload after the setting changes. Already running applications do not unload plugins immediately.
- Disabling a plugin also disables the corresponding capability. For example, after disabling
Spring, hot reload capabilities related to adding or modifying Spring Beans stop working. - If you are only troubleshooting, disable one plugin at a time, confirm the impact, then decide whether to keep it disabled.
