大目老师你好,请问nacos怎么配置druid呢?我配置了启动报错
来源:12-5 引导上下文

寂兮寥兮
2019-12-27
Located property source: CompositePropertySource {name='NACOS', propertySources=[NacosPropertySource {name='user-dev.yaml'}, NacosPropertySource {name='user.yaml'}, NacosPropertySource {name='user'}]}
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).
Process finished with exit code 1
1回答
-
一样的哈。步骤:
首先在本地的application.yml配置Druid,确保配置成功;
建立dataId = user.yaml的数据(NacosPropertySource {name='user.yaml'},我是通过你日志的这一段看出来的)
把你原先配置在本地的、Druid相关的配置,挪到Nacos里的user.yaml这条数据中。
042019-12-30
相似问题