<%#
 Copyright 2013-2024 the original author or authors from the JHipster project.
 This file is part of the JHipster project, see https://www.jhipster.tech/
 for more information.
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at
      https://www.apache.org/licenses/LICENSE-2.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-%>
# ===================================================================
# Spring Cloud <% if (serviceDiscoveryConsul) { %>Consul <% } %><% if (serviceDiscoveryType === 'nacos') { %>Nacos <% } %>Config bootstrap configuration for the "prod" profile
# ===================================================================

spring:
  cloud:
<%_ if (serviceDiscoveryEureka) { _%>
    config:
      fail-fast: true
      retry:
        initial-interval: 1000
        max-interval: 2000
        max-attempts: 100
      uri: http://admin:${jhipster.registry.password}@localhost:8761/config
      # name of the config server's property source (file.yml) that we want to use
      name: <%= baseName %>
      profile: prod # profile(s) of the property source
      label: main # toggle to switch to a different version of the configuration as stored in git
      # it can be set to any label, branch or commit of the configuration source Git repository
<%_ } _%>
<%_ if (serviceDiscoveryConsul) { _%>
    consul:
      config:
        fail-fast: true
        format: yaml # set this to "files" if using git2consul
        profile-separator: "-"
      retry:
        initial-interval: 1000
        max-interval: 2000
        max-attempts: 100
<%_ } _%>
<%_ if (serviceDiscoveryNacos) { _%>
    nacos:
      config: #配置文件地址
        server-addr: 127.0.0.1:8848
        file-extension: yaml #文件类型
        group: WORK_GROUP  #分组
        namespace: public
      discovery:
        server-addr: 127.0.0.1:8848
        namespace: public
        enabled: true
<%_ } _%>
<%_ if (serviceDiscoveryEureka) { _%>

jhipster:
  registry:
    password: admin
<%_ } _%>
# jhipster-needle-add-config-yml
