文章目录
- 是否需要mybatis依赖:不需要排除
- resources未编译
报错信息
***************************
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).
导入依赖有:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.17</version>
</dependency>
是否需要mybatis依赖:不需要排除
是否需要mybatis依赖:不需要排除即可
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
resources未编译
启动失败 Failed to determine a suitable driver class 问题解决方案