【问题标题】:spring cloud Brixton.RELEASE config serverspring cloud Brixton.RELEASE 配置服务器
【发布时间】:2017-07-25 01:37:24
【问题描述】:

在我使用Angel.SR3之前,我可以启动发现和配置服务器,我可以在http://localhost:8761找到配置服务器。 迁移到 Brixton 版本后,相同的配置服务器属性不再起作用。 配置服务器 application.yml:

server:
  port: 8099

spring:
  cloud:
    config:
      server:
        native:
          search-locations: classpath:/config 

bootstrap.yml

spring:
  application:
    name: config 

eureka:
  instance:
    non-secure-port: ${server.port:8099} 
    metadata-map:
      instanceId: ${spring.application.name}:${random.value} 
  client:
    service-url:
      defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/ 

发现服务器application.yml

server:
  port: 8761

eureka:
  instance:
    hostname: localhost
  client:
    register-with-eureka: false
    fetch-registry: false

谁有 Brixton 版本的可行演示?

【问题讨论】:

  • 发现服务器配置application.yml

标签: spring spring-boot


【解决方案1】:

Brixton 不是,但如果它有帮助,我有 Camden 到位:https://github.com/khauser/microservices4vaadin

从这里我想说你应该把尤里卡部分从bootstrap.yml移到application.yml,但我不知道这是否有帮助。

【讨论】:

  • 我试过你的演示。启动发现服务器和配置服务器后,我无法从localhost:8761 找到配置服务器。
  • 我认为启动需要一些时间。检查日志以获取注册条目或错误消息。
猜你喜欢
  • 2016-09-07
  • 2017-09-07
  • 2023-03-24
  • 1970-01-01
  • 2018-08-24
  • 2016-09-12
  • 2020-09-27
  • 2021-03-21
  • 1970-01-01
相关资源
最近更新 更多