config远端仓库的client端报错
来源:6-3 Config Client

慕虎3103396
2018-09-18
config server 启动可以拿到配置文件,但是启动order就报错,yml文件也改成了bootstrap.yml,
bootstrap的配置内容:
spring:
application:
name: order
cloud:
config:
discovery:
enabled: true
service-id: CONFIG
profile: dev
debug: true
报错内容:
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).
图片描述
这里是标题文字
4回答
-
可以说下怎么解决的,并采纳为正确答案
00 -
一路向北吧
2019-08-07
该问题也折腾了很久,发现如果注册中心不是采用默认的8761端口,需要在client端追加配置,例如
eureka:
client:
service-url:
defaultZone: http://localhost:8762/eureka/才能正常取值CONFIG服务端配置信息
00 -
慕虎3103396
提问者
2018-09-25
将端口号改成默认的8761就可以了
012018-11-17 -
慕虎3103396
提问者
2018-09-18
问题已经解决了
00
SpringCloud Finchley(M2+RELEASE+SR2)微服务实战
5672 学习 · 2489 问题
相似问题