解决办法:在启动main 函数加载 日志配置文件
log4j.properties
@SpringBootApplication
public class AdapterApplication {
public static void main(String[] args) {
SpringApplication.run(AdapterApplication .class, args);
// 日志配置
URL logConfigURL = AdapterApplication.class.getResource("/config/properties/log4j.properties");
PropertyConfigurator.configure(logConfigURL);
}
}