使用nacos配置,启动服务时一直报 Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. APPLICATION FAILED TO START

发布时间 2023-05-06 10:50:05作者: 小年的西瓜

报错日志如下:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-2023-05-05 09:46:02.328 [TID: N/A] ERROR 8236 --- [ 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).

 排查发现还是之前遇到过的:nacos上配置DataID和我项目服务名不一致导致,改成一致就好了