Springboot Hot load problem idea under the Springboot hot load

Source: Internet
Author: User

Recently learning Spring Framework, using Springboot can save a lot of configuration, it is a beginner's gospel AH.

Especially when you just write code, you want to immediately see the effect of their writing, see if you can output Hello world, so to constantly open debugging. So I found the hot load of the springboot. The operation is still very simple. Summarized here, convenient review review and summary.

First of all, remember the introduction of dependency, probably need so few

<dependency>  <!--for springboot thermal loading-            <groupid>org.springframework.boot</groupid >            <artifactId>spring-boot-devtools</artifactId>            <optional>true</ Optional>            <scope>true</scope>        </dependency>


And then find the rear build that needs to be configured.

   <build>        <plugins>            <plugin>                <groupid>org.springframework.boot</groupid >                <artifactId>spring-boot-maven-plugin</artifactId>                <!--springboot hot load fork:  Without this configuration, the Devtools will not work, that is, the app will not restart-                <configuration>                    <fork>true</fork >                </configuration>            </plugin>        </plugins>    </build>

And in the end, back to our idea software.

Open Settings --> Build-Execution-Deployment --> Compiler , will be Build project automatically. ticked on.

Use the shortcut key to Ctrl+Shift+A open the Registry... compiler.automake.allow.when.app.running hook

After the operation, restart Idea, and then change the code to see if there is a hot load?

Write a function in the controller HelloWorld return output 123 to see if the page is output? Then go back to idea and add a few numbers 456 or so after 123, and do not need to manually restart the run to see if it has been updated.

The above steps through my use, no problem ha. But every time you modify the code, the background is to re-parse the compilation, so you will need some waiting time, probably just a few seconds.

Springboot Hot load problem idea under the Springboot hot load

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.