13

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

2 Answers 2

4

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.3 https://github.com/spring-projects/spring-boot/issues/7379

Sign up to request clarification or add additional context in comments.

1 Comment

Also review this stackoverflow answer: stackoverflow.com/questions/42759587/…
4

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>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.