小结
Spring Boot返回java.lang.NoClassDefFoundError: org/springframework/boot/logging/DeferredLogFactory错误,进行了解决。
问题及解决
Spring Boot返回java.lang.NoClassDefFoundError: org/springframework/boot/logging/DeferredLogFactory的问题是由版本兼容问题导致的,对build.gradle
进行以下修改,我的情况是把版本降低,因为我是使用的Spring Boot版本2.3.3,修改后问题解决:
修改前:
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2021.0.7'
mavenBom "org.springframework.boot:spring-boot-dependencies:2.7.18"
}
}
修改后:
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR9'
"org.springframework.boot:spring-boot-dependencies:2.3.3.RELEASE"
}
}
参考
CSDN: 记录java.lang.NoClassDefFoundError: org/springframework/boot/logging/DeferredLogFactory错误