spring cloud alibaba作为微服务框架,连接msql时,启动服务报错如下:
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).
网上搜索很多,说数据源问题,url问题,我都检查过了并且都符合规范,怎么试都报错,忽然间发现我的项目时使用druid数据源的,检查pom.xml文件,发现druid-spring-boot-starter无法点击,也就是maven没有下载druid包,我重新更新pom.xml,重新下载包,问题马上解决
com.alibaba
druid-spring-boot-starter