同样的依赖在其他项目能用,在这个项目就报这个错(DatabaseInitializationDependencyConfigurer类不存在),spring-boot的版本是2.3.12.RELEASE的
2022-09-27 13:43:38.419 WARN 2836 --- [ main] ConfigServletWebServerApplicationContext :
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory
.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.cpy.CpyOfficeApplication];
nested exception is java.io.FileNotFoundException: class path resource [org/springframework/boot/sql/init/dependency/
DatabaseInitializationDependencyConfigurer.class] cannot be opened because it does not exist
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class
[com.cpy.CpyOfficeApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework
/boot/sql/init/dependency/DatabaseInitializationDependencyConfigurer.class] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [org/springframework/boot/sql/init/dependency
/DatabaseInitializationDependencyConfigurer.class] cannot be opened because it does not exist
<parent>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-parentartifactId>
<version>2.3.12.RELEASEversion>
parent>
pom文件代码都发一下吧,感觉是依赖之间有版本冲突