【发布时间】:2020-11-28 00:42:51
【问题描述】:
我正在使用 Spring Boot 2.2.9.RELEASE。我有主应用程序和一些简单的启动器(仅使用 spring-actuator 功能)在其 some-starter/src/main/resources/application.properties 文件中有一些属性:
management.server.port=9000
management.server.ssl.enabled=false
management.endpoints.enabled-by-default=false
management.endpoint.health.enabled=true
management.endpoints.web.base-path=/
management.endpoints.web.path-mapping.health=health
我已将启动器导入到我的主应用程序中,并且我相信运行状况检查端点应该与端口 9000 和路径 /health 一起使用(类似于 localhost:9000/health)。
但事实并非如此。但是,它适用于我的主应用 main-app/src/main/resources/application.properties 中的相同属性。
Spring Boot 中的属性覆盖是否有问题?我应该通过maven-resources-plugin 之类的方式配置我的资源吗?
【问题讨论】:
标签: java spring-boot spring-boot-actuator maven-resources-plugin spring-boot-starter