springcloud做微服务时,普通服务无法访问Eureka注册中心上的配置中心的问题
springcloud做微服务时,普通服务无法访问Eureka注册中心上的配置中心的问题
报这个错误:
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).
纯入门级别问题,但是我搞了快两天,才搞出来,权当自己留作笔记了,遇到相同问题的同学可以参考下
config配置中心服务已经在注册中心注册(我的项目是统一配置的),因为注册默认使用hostname,所以当访问配置中心配置时,会是这样的地址
http://[配置中心的hostname]/dev/master
然后我把bootstrap.yml改成这样
eureka:
instance:
hostname: localhost
instanceId: spring.cloud.client.ip−address:{spring.cloud.client.ip-address}:spring.cloud.client.ip−address:{server.port}
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://localhost:8888/eureka/
利用这个属性prefer-ip-address: true,即使用ip地址进行注册就可以了,这样访问配置中心的请求就变成
http://[配置中心的ip地址]/dev/master
然后就能快乐访问了,
当时真希望能有个人帮我看一下,只可惜,求人不如求己,总是麻烦人家人家也不愿意
- 微服务学习SpringCloud 之服务注册中心Eureka
- 关于服务注册中心配置了security,其他服务注册失败问题
- 使用SpringCloud搭建微服务<三>---------使用EureKa编写服务的注册中心
- 本机无法访问虚拟机上配置的apache服务问题解决
- Spring Cloud Eureka 服务注册列表显示 IP 配置问题
- SpringCloud-Eureka配置注册中心
- 通过RestTemplate的负载均衡配置和eureka注册中心来实现服务间默认规则调用
- ftp服务的搭建之vsftpd的配置(解决外网无法访问的问题)
- win7配置数据源和ODBC数据源部署类型和访问权限(windows 服务无法访问数据源的问题)
- SpringCloud学习:服务Server注册中心Eureka搭建
- Spring Cloud Eureka(第一篇) 服务注册中心以及会遇到的一些问题
- SpringCloud(第 005 篇)电影微服务,也注册到 EurekaServer 中,通过 Http 协议访问已注册到生态圈中的用户微服务
- springcloud微服务架构之搭建注册中心Eureka与注册中心的互相注册
- 解决在Fedora 12 中配置后Samba服务后,Windows依然无法访问Linux共享目录的问题。
- Spring Cloud -- 配置Eureka注册中心,注册服务
- Spring Cloud eureka 注册服务发现,访问管理页面是xml问题解决
- Spring Cloud - - - 通过消息总线更新配置中心,导致client-config服务实例在注册中心全部丢失的问题
- Dubbo无法访问远程Zookeeper已注册服务的问题
- IIS6.0配置正常,但是显示“网页无法访问”,Httperr.log中显示全是“Connections_refused”,问题总结
- 解决 Silverlight 调用 WCF 服务 跨域访问 和 Silverlight 引用服务后配置文件不加载的问题