繁体   English   中英

Spring 引导应用程序不使用 Application.Properties 文件

[英]Spring Boot Application not using Application.Properties file

我是 Spring Boot 的新手,开始探索 Spring Boot。 根据我阅读的课程和文档,Spring Boot 将自动拾取 application.properties。 我的 Application.properties 中有以下值

**Application.Properties**
server.port = 9000
server.servlet.context-path=/bharathi

但是,在 JBOSS 中部署时,服务器端口是从standalone.xml 中获取的,它指向 8085。上下文路径也是根据 war 文件自动生成的。

14:04:52,579 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8085
.
.
.
14:05:20,388 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 83) Initializing Mojarra 2.3.5.SP2-redhat-00001 for context '/ou-0.0.1-SNAPSHOT'

我不确定我在这里做错了什么,但有些不对劲。 谁能帮我解决这个问题?

server.port = 9000

这仅适用于嵌入式 tomcat 服务器 - 例如,在使用 SpringBoot 并像任何其他 java 应用程序一样运行时。

在部署服务器上,端口与服务器或部署描述符中配置的一样。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM