TIL — Spring Boot Developer Tools

leo foto
robinbajaj
Published in
2 min readApr 26, 2018

Today I learnt — Hot deploying your Sprint Boot apps is a piece of cake when using Spring Boot Developer tools. I have heard about this little utility for quite some time but only started using it recently. All you have to do is add a dependency (just like anything else in Spring Boot or Maven/Java land..) and boom.. you got yourself full blown* Hot Deploy support for your Spring Boot App.. (well it may not be quite as full blown as dedicated tools like JRebel.. but its quite good for free , full details here at their docs page)

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

If you are an Eclipse user, just save your code file, it will compile stuff in the background and hot deploy (the delta only) for you.

If you are an IntelliJ user, it does not automatically build your project when you save your code changes by doing Ctrl + S shortcut. For that, I did a tiny workaround, just change the KeyMap in Settings and change the settings to do Build Project when clicking Ctrl + S (which is normally used for saving a file). Ta da… everytime you save a file, it will (incrementally..not fully) build the project and hot deploy the changes for you.. takes like 1 sec max. Way better than waiting 15–20 secs for a full context reload when restarting the Sprint Boot app.

Since I have started using this feature.. I have legit saved myself at least 50–60 restarts a day.. That’s a lot of waiting for Spring Boot App context to load..

--

--