Intellij, Spring dev tools remote, Docker, error Unexpected 404 response uploading class files Intellij, Spring dev tools remote, Docker, error Unexpected 404 response uploading class files docker docker

Intellij, Spring dev tools remote, Docker, error Unexpected 404 response uploading class files


As of Spring Boot 1.5.0, devtools defaults were changed to exclude the devtools from fat jars.

If you want to include them, you have to set the excludeDevtools flag to false.

However, the devtools documentation doesn't explain how to do this. The necessary documentation is actually in the spring-boot-gradle-plugin documentation.

To do it, you can put this snippet of code in your build.gradle file:

bootRepackage {    excludeDevtools = false}

Unfortunately, this was buggy at first and had no effect as of Spring Boot 1.5.0. The workaround was to do this instead:

springBoot {    excludeDevtools = false}

However, I have verified that the bootRepackage approach works for Spring Boot 1.5.8 .


I got the same issues as yours while using docker-compose to compose my application ( a web service + redis server + mongo server ).

As the Spring developer tools document point out "Developer tools are automatically disabled when running a fully packaged application. If your application is launched using java -jar or if it’s started using a special classloader, then it is considered a “production application”."

I think when we running Spring Web Application inside Docker container, the developer tool is disabled then we cant remotely restart it.

Currently, I'm running my web application on the host machine and set the redis server, mongo server inside containers so I can restart the web app quickly when the code is changing in development process.


In my case I had to put the application context on the argument of the IDE RemoteSpringApplication configuration.

For example, my application root context was /virtue so I had to configure it like so: Example