Springboot in idea for hot deployment

Source: Internet
Author: User
Tags automake

Springboot Web projects, every time you modify a Java file or a resource, you have to restart the project, so that wasted a lot of time, the implementation of the hot deployment, after each modification, will automatically restart
First step: Introduce hot-loaded plug-ins, Springboot 1.3 started

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId> spring-boot-devtools</artifactid>
            <optional>true</optional>
        </dependency>

Add Spring-boot-maven-plugin in Project, primarily in eclipse, idea does not need to add this configuration, Springboot project, should have this configuration, add the contents.

<build>
        <plugins>
            <plugin>
                <groupid>org.springframework.boot</groupid >
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork >true</fork>
                </configuration>
            </plugin>
        </plugins>
</build >

Part II: Idea settings (version 14)
1. Click: File, Settings, Build, execution,deplment

Then remember Apply,ok.
2, Combination key: shift+alt+ctrl+/, select "Registry", enter, find "complier.automake.allow.when.app.running"

Attention:

Because my idea is version 14, and some 15 versions or higher in compiler are like this:

, and then the shortcut key is CTRL + Shift +a, just find complier.automake.allow.when.app.running, click to tick.

Part III: If you use the same browser as mine, then disable the cache
Press F12 (more tools--developer tools) to find the network and tick disable Cache.

The pro-test is effective.
Also, if it is eclipse, add it directly to the Pom.xml file:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId> spring-boot-devtools</artifactid>
            <optional>true</optional>
        </dependency>

Can be, pro-test effective

The above article reproduced from http://www.jianshu.com/p/9d87de712279

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.