报错内容:Cannot load driver class: org.h2.Driver
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
解决;
通过源码分析,druid-spring-boot-3-starter目前最新版本是1.2.18,虽然适配了SpringBoot3,但缺少自动装配的配置文件,需要手动在resources目录下创建META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports,文件内容如下!
XML
com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
