how to make auto reload with Spring-boot on IDEA Intellij

前端 未结 3 1335
半阙折子戏
半阙折子戏 2021-01-30 04:31

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

相关标签:
3条回答
  • 2021-01-30 04:45

    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

    0 讨论(0)
  • 2021-01-30 04:48

    For macOS

    1. Preference -> Compiler -> check BUild project on build automatically asds

    2. shift + command + A

    check compiler.automake.allow.when.app.running

    If the static files are not reloaded, press CTRL+F9 to force a reload.

    0 讨论(0)
  • 2021-01-30 04:48

    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.

    0 讨论(0)
提交回复
热议问题