我正在按照本指南https://medium.com/@lhartikk/development-environment-in-spring-boot-with-docker-734ad6c50b34尝试使用本地docker容器中的简单spring启动应用程序进行自动重启,实时重新加载和远程调试。我在触发自动重启时遇到错误:
Exception in thread "File Watcher" java.lang.IllegalStateException: Unexpected 404 response uploading class files
Dockerfile:
FROM openjdk
VOLUME /tmp
ADD target/learn-docker-0.0.1-SNAPSHOT.jar app.jar
RUN sh -c 'touch /app.jar'
ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
运行命令:
docker build -t learn_docker .
docker run -p 8080:8080 -d learn_docker