【异常】SpringBoot3.2.0 Description: Failed to configure a DataSource: ‘url‘ att

mybatisPlus 多数据源导致

异常

复制代码
Description:
 
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
 
Reason: Failed to determine a suitable driver class
 
 
Action:
 
Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (the profiles dev are currently active).

解决

spring-boot 1.5.x 2.x.x

复制代码
<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
  <version>${version}</version>
</dependency>

spring-boot3 使用以下依赖

复制代码
<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
  <version>${version}</version>
</dependency>
相关推荐
一只大袋鼠20 小时前
MySQL 进阶:聚集函数、分组、约束、多表查询
开发语言·数据库·mysql
hef2881 天前
如何生成特定SQL的AWR报告_@awrsqrpt.sql深度剖析单条语句性能
jvm·数据库·python
xcjbqd01 天前
Python API怎么加Token认证_JWT生成与验证拦截器实现
jvm·数据库·python
二月十六1 天前
SQL Server 2022 新语法:IS [NOT] DISTINCT FROM 彻底解决 NULL 比较难题
数据库·sqlserver
~ rainbow~1 天前
前端转型全栈(四)——常见的错误及解决方案
数据库·oracle·全栈
数厘1 天前
2.1SQL 学习:先懂数据库概念再学 SQL
数据库·sql·学习
Cat_Rocky1 天前
redis哨兵模式
数据库·redis
广师大-Wzx1 天前
一篇文章看懂MySQL数据库(下)
java·开发语言·数据结构·数据库·windows·python·mysql
hef2881 天前
golang如何使用range over func_golang range over func迭代器使用方法
jvm·数据库·python
qq_380619161 天前
html如何查看windows
jvm·数据库·python