配置文件中正确的语法,用于在单独的VM中部署Jhipster注册表

时间:2019-07-12 12:40:30

标签: jhipster netflix-eureka spring-cloud-config jhipster-registry

我在单独的VM上运行Jhipster注册表,并且API连接遇到问题。在将Jhipster Registry移至另一台VM之前,一切正常。

以下是配置文件的相关部分:

application-prod.yml

    instance:
        prefer-ip-address: true
    client:
        service-url:
            defaultZone: http://admin:${jhipster.registry.password}@10.202.25.166:8761/eureka/

bootstrap-prod.yml

    cloud:
        config:
            fail-fast: true
            retry:
                initial-interval: 1000
                max-interval: 2000
                max-attempts: 100
            uri: http://admin:${jhipster.registry.password}@10.202.25.166:8761/config
            name: app
            profile: prod
            label: master

我希望我错误地设置了URI值,但是在查找配置中使用IP与“ localhost”的示例/说明时遇到了麻烦。当API在VM上启动时,最后的输出为"No URLs will be polled as dynamic configuration sources."

1 个答案:

答案 0 :(得分:0)

我在application-prod.yml中添加了I added eureka.instance.ip-address: 10.202.25.166,现在可以正常使用了