Springboot Thermal Deployment (ii)--springboot hot Deployment and release

Source: Internet
Author: User

I. Overview of the way of implementation

  

  Note the following hot deployment methods in idea is not turned on automatically compiled by default, manual compilation requires shortcut keys (ctrl+shift+f9), automatic compilation of the modified configuration as follows: (note refresh not too fast, there will be 1-2 seconds delay)

File-settings-compiler-build Project automatically

Second, Spring-boot-devtools

  Direct introduction of dependencies in POM

<Dependency>        <groupId>Org.springframework.boot</groupId>        <Artifactid>Spring-boot-devtools</Artifactid>        <Optional>True</Optional></Dependency>

set the following two items (the first item is   set to set the second item directly )

1) "File", "Settings", "Build,execution,deplyment", "Compiler", tick "Build Project automatically".

2) key combination: "shift+ctrl+alt+/", select "Registry", tick "compiler.automake.allow.when.app.running".

  After that, you can run it directly!

third, spring-loaded

    adding dependencies in plugins

<Build>        <Plugins>            <plugin>                <groupId>Org.springframework.boot</groupId>                <Artifactid>Spring-boot-maven-plugin</Artifactid>                <Dependencies>                    <!--Spring Hot Deployment -                    <Dependency>                        <groupId>Org.springframework</groupId>                        <Artifactid>springloaded</Artifactid>                        <version>1.2.6.RELEASE</version>                    </Dependency>                </Dependencies>            </plugin>        </Plugins>    </Build>

 If the dependency hint not found, first write in the above let maven download, and then move to plugin inside

   Command Line window start

Find the path to Pom.xml, if you open the pom and then hover over the tab to see it, or right-click the->file path on the POM

Open the cmd window under this path (win can quickly open in the corresponding path via shift), enter the start command

MVN Spring-boot:run

    This allows you to modify the code in the IDE to implement hot loading!

There is also a complex way to specify the location of the jar package through the start parameter, feel more complex, temporarily do not repeat, you can refer to: here

Iv. release of spring-boot procedures

  1.jar form

Through Maven Direct install, the project package and related dependencies also hit the same jar, Maven life cycle, refer to Here

    

    Start:

  2.war form

    Reference: Https://www.cnblogs.com/gdpuzxs/p/7224959.html?utm_source=itdadao&utm_medium=referral

      :https://www.cnblogs.com/coder-wzr/p/7860778.html   

Note: Context-path is consistent with Warname

Springboot Thermal Deployment (ii)--springboot hot Deployment and release

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.