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).错误解决方法
上面这个错误是因为在启动服务时要加载配置文件,里面的数据库配置,有时候是不需要配置的,比如在用阿里云上传的时候,这时候有两种解决办法。如下!
第一种:也是比较常用的,就是在那个服务的启动类上的SpringBootApplication的括号里加图片上的就可以了。
第二种就是:把其他服务的yml或者properties配置文件的数据库配置复制到此服务的配置文件内也可以解决。