How to auto reload spring boot application in docker using spring dev tools How to auto reload spring boot application in docker using spring dev tools docker docker

How to auto reload spring boot application in docker using spring dev tools


You should add new Run/Debug configuration and select RemoteSpringApplication as a Main class. Also you should set Program arguments as ip address to your service (ex. http://localhost:8080). Also add spring.devtools.remote.secret: mysecret into your application properties.
My configuration:enter image description here

http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#_running_the_remote_client_application

Spring boot has bug with RemoteSpringApplication which do not allows to remove or add new class. This will be fixed in Spring Boot 1.4.3https://github.com/spring-projects/spring-boot/issues/7379


Also, try to add this plugin:

./pom.xml

<build>    <plugins>        <plugin>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-maven-plugin</artifactId>            <configuration>                <excludeDevtools>false</excludeDevtools>            </configuration>        </plugin>    </plugins></build>