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

后端 未结 3 940
予麋鹿
予麋鹿 2021-01-12 22:09

Im trying to use Spring Boot Dev tools (Spring Remote), and automatically upload recompiled files to my docker container.

I keep receiving Unexpected 404 resp

3条回答
  •  一生所求
    2021-01-12 22:27

    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.

提交回复
热议问题