Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could

报错:Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.

[2019-12-20 10:13:48] [INFO ][org.springframework.cloud.alibaba.sentinel.SentinelWebAutoConfiguration:73]-- [Sentinel Starter] register Sentinel with urlPatterns: [/*].
[2019-12-20 10:13:48] [ERROR][org.springframework.boot.web.embedded.tomcat.TomcatStarter:62]-- Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthEndpoint' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'healthIndicatorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicatorRegistry]: Factory method 'healthIndicatorRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbHealthIndicator' defined in class path resource [org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicator]: Factory method 'dbHealthIndicator' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
[2019-12-20 10:13:48] [INFO ][org.apache.catalina.core.StandardService:173]-- Stopping service [Tomcat]
[2019-12-20 10:13:48] [WARN ][org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext:554]-- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
[2019-12-20 10:13:48] [INFO ][org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener:142]-- 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[2019-12-20 10:13:48] [ERROR][org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:42]-- 

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

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could_第1张图片
解决:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could_第2张图片

你可能感兴趣的:(微服务)