Skip to content

Commit

Permalink
增加 spring cloud alibaba sentinel 服务容错
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Feb 15, 2020
1 parent d32a94c commit 96dae56
Showing 1 changed file with 15 additions and 12 deletions.
@@ -1,5 +1,16 @@
server:
port: 18080
port: 18080 # 服务器端口,设置为 18080 避免和本地的 Apollo 端口冲突

# Apollo 相关配置项
app:
id: ${spring.application.name} # 使用的 Apollo 的项目(应用)编号
apollo:
meta: http://127.0.0.1:8080 # Apollo Meta Server 地址
bootstrap:
enabled: true # 是否开启 Apollo 配置预加载功能。默认为 false。
eagerLoad:
enable: true # 是否开启 Apollo 支持日志级别的加载时机。默认为 false。
namespaces: application # 使用的 Apollo 的命名空间,默认为 application。

spring:
application:
Expand All @@ -19,17 +30,9 @@ spring:
ds1:
# 对应 DataSourcePropertiesConfiguration 类
apollo:
namespaceName: application # Nacos 命名空间
flowRulesKey: sentinel.flow-rule
namespaceName: application # Apollo 命名空间
flowRulesKey: sentinel.flow-rule # Apollo 配置 key
data-type: json # 数据格式
rule-type: FLOW # 规则类型

app:
id: demo-application # 使用的 Apollo 的项目(应用)编号
apollo:
meta: http://127.0.0.1:8080 # Apollo Meta Server 地址
bootstrap:
enabled: true # 是否开启 Apollo 配置预加载功能。默认为 false。
eagerLoad:
enable: true # 是否开启 Apollo 支持日志级别的加载时机。默认为 false。
namespaces: application # 使用的 Apollo 的命名空间,默认为 application。

0 comments on commit 96dae56

Please sign in to comment.