Spring Boot MyBatis-Plus 多数据源导致工程无法启动

Spring Boot MyBatis-Plus About 704 words

错误日志

***************************
APPLICATION FAILED TO START
***************************

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 (no profiles are currently active).

使用版本

  • Spring Boot: 3.2.1
  • MyBatis-Plus: 3.5.5

解决方法

移除Spring Boot自定配置的DataSourceAutoConfiguration即可。

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
Views: 1,023 · Posted: 2024-04-22

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh