具体报错如下
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-05-11 10:37:35.148 ERROR 11284 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
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 (the profiles dev are currently active).
Disconnected from the target VM, address: '127.0.0.1:51160', transport: 'socket'
Process finished with exit code 1
如下图所示
大致描述为:
未能配置数据源:“url”属性未指定,无法配置嵌入式数据源。
原因:未能确定合适的驱动程序级别
Action:
考虑以下几点:
如果你想要一个嵌入式数据库(H2、HSQL或Derby),请把它放在类路径上。
如果要从特定配置文件加载数据库设置,则可能需要激活它(配置文件开发人员当前处于活动状态)。
解决:
<exclusions> <exclusion> <artifactId>mybatis-plus-boot-starter</artifactId> <groupId>com.baomidou</groupId> </exclusion> </exclusions>