【报错】springboot3启动报错

报错内容: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
相关推荐
无羡仙1 天前
替代 Object.freeze 的精准只读模式
前端·javascript
web前端1231 天前
Java客户端开发指南 - 与Web开发对比分析
前端
龙在天1 天前
前端 9大 设计模式
前端
搞个锤子哟1 天前
网站页面放大缩小带来的问题
前端
hj5914_前端新手1 天前
React 基础 - useState、useContext/createContext
前端·react.js
用户8160791833331 天前
告别“魔法”:包你解决 Gradle 的下载慢问题
java
半花1 天前
【Vue】defineProps、defineEmits 和 defineExpose
前端·vue.js
GottdesKrieges1 天前
OceanBase容量统计:租户、数据库、表大小
数据库·oceanbase
霍格沃兹_测试1 天前
软件测试 | 测试开发 | H5页面多端兼容测试与监控
前端
toooooop81 天前
本地开发环境webScoket调试,保存html即用
前端·css·websocket