Appendix A. Spring Boot Developer Tools

 

Spring Boot 1.3 introduced a new set of developer tools that make it even easier to work with Spring Boot at development time. Among its many capabilities are

  • Automatic restart— Restarts a running application when files are changed in the classpath
  • LiveReload support— Changes to resources trigger a browser refresh automatically
  • Remote development— Supports automatic restart and LiveReload when deployed remotely
  • Development property defaults— Provides sensible development defaults for some configuration properties

Spring Boot’s developer tools come in the form of a library that can be added to a project as a dependency. If you’re using Gradle to build your project, the development tools can be added with the following line in your build.gradle file:

compile "org.springframework.boot:spring-boot-devtools"

Or it can be added as a <dependency> in a Maven POM:

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

The developer tools will be disabled when your application is running from a fully packaged JAR or WAR file, so it’s unnecessary to remove this dependency before building a production deployment.

Automatic restart

 
 

LiveReload

 
 
 
 

Remote development

 
 

Development property defaults

 
 
 
 

Globally configuring developer tools

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest