mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-14 14:19:08 +08:00
配置文件添加读取环境变量的支持:
作用: 1.通过加持环境变量让运行更加灵活; 2.支持Docker官方的Docker Swarm多主机的集群支持; 说明: defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/ 如果配置了大括号里面的冒号前面的环境变量则使用,否则使用冒号后面的默认值.
This commit is contained in:
1 parent
56a2f1ebdf
commit
b024fe5695
21 files changed
+42
-42
No files matched your search
@@ -6,11 +6,11 @@ jasypt:
|
||||
spring:
|
||||
redis:
|
||||
password:
|
||||
host: pigx-redis
|
||||
host: ${REDIS-HOST:pigx-redis}
|
||||
# zipkin
|
||||
zipkin:
|
||||
enabled: true
|
||||
base-url: http://pigx-zipkin
|
||||
base-url: http://${ZIPKIN-HOST:pigx-zipkin}
|
||||
sleuth:
|
||||
web:
|
||||
client:
|
||||
@@ -79,7 +79,7 @@ mybatis-plus:
|
||||
|
||||
#swagger公共信息
|
||||
swagger:
|
||||
host: pigx-gateway:9999
|
||||
host: ${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}
|
||||
title: PigX Swagger API
|
||||
description: 全宇宙最牛逼的Spring Cloud微服务开发脚手架
|
||||
version: @project.version@
|
||||
@@ -97,7 +97,7 @@ swagger:
|
||||
- scope: server
|
||||
description: server all
|
||||
token-url-list:
|
||||
- http://pigx-gateway:9999/auth/oauth/token
|
||||
- http://${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}/auth/oauth/token
|
||||
|
||||
## spring security 配置
|
||||
security:
|
||||
@@ -109,4 +109,4 @@ security:
|
||||
- /v2/api-docs
|
||||
resource:
|
||||
loadBalanced: true
|
||||
token-info-uri: http://pigx-auth/oauth/check_token
|
||||
token-info-uri: http://${AUTH-HOST:pigx-auth}/oauth/check_token
|
||||
Reference in new issue
Block a user