Common Spring boot
Imal Perera  

Auto Build and Deploy Spring Boot App on Change

Spread the love

One of the important things, when you do programming, is to stay productive unless at the end of the day you have worked and worked and worked hard but the end result is minimum. to be productive you need to know your stuff your tools and you should have spent time on learning and also should be able to bring all the previous knowledge and experience into the picture also you need to avoid or automate repetitive things you do throughout your working time.

I’m an old spring developer used to work on XML configuration and eclipse as the IDE, but I recently look at spring again and understood that now there is an easy way of getting spring project setup in a matter of seconds using “spring-boot” and I wanted to look at IntelliJ IDEA.

The first problem I faced is that it is not getting build automatically once a change is made to the java code or the templates, this was very annoying and wasting a lot of my time. so I had to follow the following method to setup auto build on IntelliJ

1. Add Spring Boot Dev Tools to Your pom.xml


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

2. Enable “Build Project Automatically”

Screen Shot 2017-01-24 at 11.29.25 AM

3. Finally

Finally Open “Enter an Action or Name” search dialog and search for registry and select it, finally in the window you get to go down until you find ‘compiler.automate.allow.when.app.running

Screen Shot 2017-01-24 at 11.31.38 AM
Screen Shot 2017-01-24 at 11.33.23 AM

That is all you need to do to save lot of time In IntelliJ but I’m not sure what changes require in Eclipse IDE.

Leave A Comment