I had wrote a project base on Spring-boot,tomcat,freemarker, I run it successful, but whenever I modify some templates and java class, I must restart server or use \"reload chan
First, be sure that you added spring-boot-devtools
as dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
Second, verify that the option check-box File->Setting –> Build, Execution, Deployment –> Compiler–>
Build project automatically is selected.
Last, press SHIFT+CTRL+A
for Linux/Windows users or Command+SHIFT+A
for Mac users, then type registry in the opened pop-up window. Scroll down to Registry...
using the down arrow key and hit ENTER
on Registry...
. In the Registry
window verify the option compiler.automake.allow.when.app.running is checked.
If the static files are not reloaded, press CTRL+F9
to force a reload.
The instructions above are taken from here
For macOS
Preference -> Compiler -> check BUild project on build automatically
shift + command + A
check compiler.automake.allow.when.app.running
If the static files are not reloaded, press CTRL+F9
to force a reload.
CTRL+F9
to make project with debugging.
The idea is to make the project automatically work while not running or debugging!
Setting->Build->Compiler->check Make project automatically.