在springboot中,日志相对路径的配置,日志会存储在当前项目下的根目录中,而不是logging.file.path
logging.file.name = xxx.log
pom:加入如下依赖:可通过连接直接访问日志:http://****/actuator/logfile
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
http://******//actuator显示接口地址
显示接口权限通过以下配置
management:
endpoints:
web:
exposure:
# include: "*" # * 在yaml 文件属于关键字,所以需要加引号, 可以看全部接口
include: "logfile" # * 在yaml 只显示logfile接口