Last active
January 10, 2020 14:34
-
-
Save alexcmd/a072ed5c303e657e230f78f1f6f2a02d to your computer and use it in GitHub Desktop.
Bootstrap config for Spring Boot Consul cloud Configuration and Service Discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 0 | |
management: | |
server: | |
port: 9155 | |
endpoints: | |
web: | |
base-path: / | |
exposure: | |
include: '*' | |
app: | |
key1: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
application: | |
name: app | |
cloud: | |
consul: | |
host: localhost | |
port: 8500 | |
config: | |
# Consul Key Path | |
# Default cfg /config/apps.yml | |
# App cfg /config/app/application.yml | |
enabled: true | |
format: files | |
name: /${spring.application.name}/application | |
defaultContext: 'apps' | |
prefix: /config | |
data-key: 'application' | |
discovery: | |
health-check-path: /health | |
instanceId: ${spring.application.name}:${vcap.application.instance_id:${spring.application.instance_id:${random.value}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
consul agent -data-dir=/tmp/consul -bootstrap=true -server=true -bind=127.0.0.1 -dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment