<%#
 Copyright 2013-2017 the original author or authors from the JBooter project.

 This file is part of the JBooter project, see https://jbooter.github.io/
 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

      http://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 (serviceDiscoveryType === 'consul') { %>Consul <% } %>Config bootstrap configuration for the "dev" profile
# In prod profile, properties will be overwriten by the ones defined in bootstrap-prod.yml
# ===================================================================
<%_ if (serviceDiscoveryType === 'eureka') { _%>

jbooter:
    registry:
        password: admin
<%_ } _%>

spring:
    application:
        name: <%= baseName %>
    profiles:
        # The commented value for `active` can be replaced with valid Spring profiles to load.
        # Otherwise, it will be filled in by <%= buildTool %> when building the WAR file
        # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
        active: #spring.profiles.active#
    cloud:
        <%_ if (serviceDiscoveryType === 'consul') { _%>
        consul:
            discovery:
                tags: profile=${spring.profiles.active}, version=${info.project.version}
            config:
                fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config
                format: yaml
                profile-separator: "-"
        <%_ } _%>
        <%_ if (serviceDiscoveryType === 'eureka') { _%>
        config:
            fail-fast: false # if not in "prod" profile, do not force to use Spring Cloud Config
            uri: http://admin:${jbooter.registry.password}@localhost:8761/config
            # name of the config server's property source (file.yml) that we want to use
            name: <%= baseName %>
            profile: dev # profile(s) of the property source
            label: master # 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 config source git repository
        <%_ } _%>

info:
    project:
        version: #project.version#
