I followed this link to deploy my application into local docker directly and debug it. I was able to deploy and debug but auto reload was not working for me Can you help me with auto reload for dockers using spring dev tools
The reason I am interested in doing it this way because my application talks to 5 different services and running them individually might be little difficult. So will be hosting them individually on the docker.
My trouble here is as of now I have to kill the container, then remove it and then add the new one back and I have to do this each time I change something
I am using Spring Boot 1.4 | IntelliJ | Docker and spring dev tools
By default for Vaadin applications based on Spring Boot, live reload uses Spring Boot Developer Tools to automatically restart the server whenever classpath entries are updated. The restart is faster than a manual restart, as it uses a customized class loader that reloads only the application's own classes.
26) How can you enable auto reload of application with Spring Boot? You can enable auto-reload/LiveReload of spring boot application by adding the spring-boot-devtools dependency in the pom. xml file.
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:
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.3 https://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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With