【发布时间】:2018-03-23 22:17:25
【问题描述】:
我有一个 springboot 应用程序,我想在 tomcat 中部署它。我按照说明here 我在 src/main/resources 中有 application.properties 文件,其中包含以下条目
server.context-path=/mycontext
server.port=9000
我可以看到这些属性是从执行器 url 加载的。
applicationConfig: [classpath:application.properties]": {
"server.port": "9000",
"server.context-path": "/mycontext"}
当我将它作为可执行 jar 运行时,它工作正常,但是当我部署到 tomcat 时,它仍然侦听 8080 端口并且上下文值没有更新,而是回退到应用程序文件夹名称。如果我错过了什么,请告诉我。提前致谢。
【问题讨论】:
-
你在外部部署了它?
-
是构建为战争并部署到 tomcat
标签: java spring spring-mvc tomcat spring-boot