Two ways to Springboot hot deployment

Source: Internet
Author: User

Springboot Heat Deployment Method A total of two kinds, respectively, using two different dependencies

Springboot 1.3 springboot Devtools Hot Deployment

①:spring-boot-devtools②:spring Loaded

Way One:

Add dependencies in the project's Pom file:

1 <!--hot deployment jar-->2 <dependency>3     <groupId> Org.springframework.boot</groupid>4     <artifactid>spring-boot-devtools</artifactid >5 </dependency>

Then: select "Registry" Using shift+ctrl+alt+ "/" (shortcut key in idea) and tick compiler.automake.allow.when.app.running

Way two:

Add the following code to the project

    <build>        <plugins>            <plugin>                <!--springboot Compile plugins--                <groupId> Org.springframework.boot</groupid>                <artifactId>spring-boot-maven-plugin</artifactId>                <dependencies>                    <!--Spring Thermal deployment-                    -<!--the dependency is not downloaded here, and can be placed in the plugin after the build tag is downloaded and pasted into the >                    <dependency>                        <groupId>org.springframework</groupId>                        <artifactId> springloaded</artifactid>                        <version>1.2.6.RELEASE</version>                    </dependency>                </dependencies>            </plugin>        </plugins>    </build>            

After adding, you need to run with the MVN directive:

First find the edit configurations in idea, then do the following: (click "+" in the upper left corner, then select Maven will appear on the right panel, enter the command in the red line, you can name the directive (here named Mvnspringbootrun) )

    

Click Save will appear in the idea project running area, click the green arrow to run

    

Two ways to Springboot hot deployment

Related Article

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.