2020
09-28
09-28
Springboot项目使用Slf4j将日志保存到本地目录的实现代码
1.引入jar包<dependency><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId><version>1.7.25</version></dependency>2.编写application.properties/yml#.propertieslogging.config=classpath:logback-spring.xmllogging.file=#存放路径#.ymllogging:config:classpath:logback-spring.xmlfile:#存放路径3.编写logback-spring.xml我们在src/main/resources中创建一个logback-spring.xml,注意:-spring...
继续阅读 >