How to do it...

Continuing with our BookPub project, we will be adding a DevTools module to the main build configuration by performing the following steps:

  1. Add the following content to the build.gradle file located at the root of the project:
dependencies { 
    ... 
    compile("io.dropwizard.metrics:metrics-graphite:3.1.0") 
    compile("org.springframework.boot:spring-boot-devtools") 
    runtime("com.h2database:h2") 
    ... 
} 
  1. Start the application by running ./gradlew clean bootRun.
  2. After application startup, you might notice in the console log an output warning about the inability to register with Spring Boot admin (unless you have one running) that looks like this: Failed to register application as Application.... Let's make a live change to the application.properties file located in the build/resources/main directory from the root of our project and add a property entry with the following content:
spring.boot.admin.auto-registration=false 
  1. Without doing anything else, upon saving the file, we should see the console log showing us that the application context is being restarted.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.80.45