4月24日 Failed to determine a suitable driver class

出现
在一个SpringCloud项目里,启动子服务出现以下报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
***************************
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 cl


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).

原因
在父项目的pom中引入了数据库相关依赖,由依赖传递
解决