NUL*_*ULL 5 java spring spring-boot
logfile我的 Spring Boot 应用程序中的端点有问题- 它被遗漏了。这是我的应用程序配置:
server:
port: 8081
info:
app:
name: Foo Service
component: Foo Service
secret-message: "{cipher}a702d2b5b0c6bc2db67e7d487c6142e7c23254108503d1856ff516d0a64bbd3663a2514a86647dcf8467d042abcb8a6e"
logging:
file: "target/foo.log"
management:
context-path: "/actuator"
spring:
application:
name: "foo-service"
boot:
admin:
url: http://spring-boot-admin-url:9000
client:
health-url: http://app-url:8081/actuator/health
management-url: http://app-url:8081/actuator
service-url: http://app-url:8081
metadata:
user.name: "${security.user.name}"
user.password: "${security.user.password}"
username: "${security.user.name}"
password: "${security.user.password}"
security:
user:
name: name
password: password
Run Code Online (Sandbox Code Playgroud)
Spring Boot 启动器执行器版本是1.5.2. 还/info和/health端点行之有效的例子。
您是否收到 404(未找到)或 401(未经授权)?如果是后者,则添加
endpoints:
logfile:
sensitive: false
Run Code Online (Sandbox Code Playgroud)
否则,您可以通过将级别设置为 DEBUG 并搜索“logfile”来启用自动配置日志记录。这可能会给您一些提示,说明端点是否未启用以及为何尚未启用。
logging.level.org.springframework.boot.autoconfigure.logging=DEBUG
| 归档时间: |
|
| 查看次数: |
4963 次 |
| 最近记录: |