Spring boot instant restart (hot replacement) instructions for use, springboot

Source: Internet
Author: User

Spring boot instant restart (hot replacement) instructions for use, springboot

Requirement

During spring-boot project development, the project starts very slowly. How painful it is to restart the project every time you modify the code or static resource file. How can I "restart" the project when it is changed again?

Lead

Spring-boot-devtools the spring module can solve this requirement, or even exceed the expected functions. The biggest feature is that the project will be "restarted immediately" as long as there are changes, but it saves a lot of time than manual start. Even if there is no savings, it is easy to simply restart the feature automatically.
As mentioned above, remote update and restart are also supported. It is pushed to the remote server by monitoring local path file modifications, and then restarted. You can use it for any modifications to local resources in your spring-boot project.

The LiveReload plug-in can be used in a browser.

Note

If your project uses the "template engine framework", using it will make you feel bad.

Such as frequently used Freemarker, Velocity, Groovy, Thymeleaf, Mustache

Use

Gradle build configuration

compile(“org.springframework.boot:spring-boot-devtools”)

You only need to add dependencies (that is, reference jar) without using "code ". However, some configurations can be used and configured in application. properties.

Spring. devtools. * These listed configurations are all related to spring-boot-devtools.

Spring. devtools. restart. enabled indicates whether automatic start is enabled.

Summary

The above is a small series of spring boot instant restart (hot replacement), I hope to help you, if you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.