【发布时间】:2021-07-06 14:06:34
【问题描述】:
一个简单的 spring-boot 项目 (Initializr link) 会生成一个 @SpringBootTest 类,该类会吐出以下 DEBUG 日志消息:
DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - ...
DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - ...
DEBUG org.springframework.test.context.BootstrapUtils - ...
DEBUG org.springframework.test.context.support.AbstractContextLoader - ...
DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - ...
DEBUG org.springframework.test.context.support.ActiveProfilesUtils - ...
DEBUG org.springframework.test.context.support.DependencyInjectionTestExecutionListener - ...
DEBUG org.springframework.test.context.support.TestPropertySourceUtils - ...
这发生在实际测试类开始执行之前。
- 启用该日志记录的配置在哪里?
- 此功能记录在哪里?
- 如何关闭?
谢谢!
【问题讨论】:
标签: spring-boot logging