Using Spring Boot's DevTools for hot code reloading

Developers are always looking for ways to speed things up. Long ago, one of the biggest speedups was incremental compilers and having them run every time we saved a file. Now that it's permeated modern tools, no one thinks twice about such a feature.

Something critically needed when it comes to building Spring Boot apps is the ability to detect a change in our code and relaunch the embedded container.

Thankfully, we just need one addition to our code we built in the previous chapter:

    compile("org.springframework.boot:spring-boot-devtools") 
If you happen to be using Maven, you would want to include the optional flag.

So, this tiny module performs the following activities:

  • Disables cache ...

Get Learning Spring Boot 2.0 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.