我可以将注册表添加到网关jhipster应用程序吗?

时间:2017-09-15 21:30:39

标签: registry jhipster netflix-eureka

我可以为没有注册表创建的网关应用添加注册表支持吗? 我有一个网关应用程序,当我创建这个应用程序时,我不选择jhipster注册表。 它有可能吗?或者我是否需要逐行添加eureka配置?

eureka:
    client:
        enabled: true
        healthcheck:
            enabled: true
        fetch-registry: true
        register-with-eureka: true
        instance-info-replication-interval-seconds: 10
        registry-fetch-interval-seconds: 10
    instance:
        appname: cadgateway
        instanceId: cadgateway:${spring.application.instance-id:${random.value}}
        lease-renewal-interval-in-seconds: 5
        lease-expiration-duration-in-seconds: 10
        status-page-url-path: ${management.context-path}/info
        health-check-url-path: ${management.context-path}/health
        metadata-map:
            zone: primary # This is needed for the load balancer
            profile: ${spring.profiles.active}
            version: ${info.project.version}

1 个答案:

答案 0 :(得分:2)

修改您的.yo-rc.json文件并将行"serviceDiscoveryType": false,更改为"serviceDiscoveryType": "eureka",,然后使用jhipster app --with-entities重新生成您的应用,并使用git合并您可能已完成的自定义。< / p>