gpt4 book ai didi

java - Spring Boot 。丢失/日志文件端点

转载 作者:塔克拉玛干 更新时间:2023-11-01 22:39:52 24 4
gpt4 key购买 nike

我的 spring boot 应用程序中的 logfile 端点有问题 - 它被遗漏了。这是我的应用程序配置:

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

Spring Boot 启动器执行器版本为 1.5.2。例如,/info/health 端点也运行良好。

最佳答案

您是否收到 404(未找到)或 401(未授权)?如果是后者,则添加

endpoints:
logfile:
sensitive: false

否则,您可以通过将级别设置为 DEBUG 并搜索“logfile”来启用自动配置日志记录。这可能会为您提供一些提示,说明端点是否未启用以及为何未启用。

logging.level.org.springframework.boot.autoconfigure.logging=DEBUG

关于java - Spring Boot 。丢失/日志文件端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43663876/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com