Hot reload of changed classes in CE 2024

已回答

Hi, I'm trying out a newer Community Edition after working with the 2018 version for a while. My project is a Spring Boot + Java web app (not using Spring devtools), run in an Application configuration. In the 2018 version, I could make certain changes to Java code, and get the code reloaded in the running app server, without restarting the server. This no longer works i CE 2024, with an Application configuration. Can I enable it somehow.?

0
Hi,

Can you refer to this article to check if the options are enabled(also works on CE): https://www.jetbrains.com/help/idea/altering-the-program-s-execution-flow.html#reload_classes

The class reload can only be enabled under Debug mode.
0

Can confirm that running "Compile and reload modified file" while debugging triggers application server restart.

0

Hello,

I've tested on IDEA CE with the spring-petclinic app, and the debug hot reload mode is supported with a simple modification by following this guide:
https://youtrack.jetbrains.com/articles/SUPPORT-A-1046/How-to-automatically-reload-changed-classes-in-IDEA

Can you provide more info about your project type?

0

These settings still trigger application server restart for me. 

The project is a Spring Boot (3.2) web application using the Vaadin (24) UI framework. It's built with maven, and run as a stand-alone jar. the IDEA run configuration is of type “Application”. 

0
Could you please provide a minimal sample project so I can reproduce the issue without including your sensitive code? Thank you!

Please upload it to https://uploads.jetbrains.com/ and paste the upload id here, the uploaded file is only visible to JetBrains employees.
0

Until then, a workaround: Since it's a Vaadin project, we have the Vaadin plugin, which offers the “Debug using Hotswap Agent” context action under the configuration list dropdown, in the kebab menu.

0
Ok, I'll set up a simple Vaadin project to reproduce it. Is the project running on Windows,  macOS or Linux?
0

I'm running it on Linux.

0

Hi Risnes,

I've tried this project on Linux with Application run: https://github.com/spring-guides/gs-crud-with-vaadin/tree/main/complete

However I can't reproduce it, once code changed, a Gradle Apply Hotswap button will be shown and it works. If you have time, please share a simple sample project and upload it to https://uploads.jetbrains.com/ and paste the upload id here, the uploaded file is only visible to JetBrains employees. share a 

0

请先登录再写评论。