Eclipse Spring Boot Project Hot deployment

Source: Internet
Author: User

Spring Boot Project Hot deployment

One, reference document: Springboot Hot Deployment

Note

2.Digital Twin 项目使用Spring boot 版本为:1.2.3.RELEASE,使用spring-boot-devtools无效. 查看Spring-boot-devtools,最低版本为1.3.0. 猜测Spring boot 整合Spring-boot-devtools最低版本为1.3.03.把SpringLoaded放入spring-boot-maven-plugin中,会导致端口占用,需要用控制面板关闭java程序,所有不推荐

Two. 3 Ways to use

1. Use springloaded to put in Spring-boot-maven-plugin (Port will be occupied, not recommended)

Adding dependencies in pom files

<build> <plugins> <plugin>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-maven-plugin</artifactId>  <dependencies>   <dependency>    <groupId>org.springframework</groupId>    <artifactId>springloaded</artifactId>    <version>1.2.6.RELEASE</version>   </dependency>  </dependencies> </plugin> </plugins></build>

2.spring-boot-devtools (Springboot version 1.3.0 above, recommended)

Add Pom file Dependency

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <!-- 这个需要为 true 热部署才有效 --></dependency>

If we want to specify that Devtools listen to the specified folder, you can configure it in APPLICATION.YML

Spring.devtools.restart.additional-paths=your Path

3. Using springloaded, download springloaded common version (e.g. Springloaded-1.2.3.release.jar) into the specified path (recommended)

启动项目:Application文件-->run as--> Run configurations...-->Arguments-->VM arguments     -javaagent:D:/javasoft/springloaded-1.2.3.RELEASE.jar  -noverify

Eclipse Spring Boot Project 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.