Admin属性配置
本篇主要讲解如何在 admin端配置 ShenYu 的相关属性 。
属性配置
shenyu:
register:
registerType: http #http #zookeeper #etcd #nacos #consul
serverLists: #localhost:2181 #http://localhost:2379 #localhost:8848
props:
sessionTimeout: 5000
connectionTimeout: 2000
checked: true
zombieCheckTimes: 5
scheduledTime: 10
nacosNameSpace: ShenyuRegisterCenter
database:
dialect: mysql
init_script: "META-INF/schema.sql"
init_enable: true
sync:
websocket:
enabled: true
# zookeeper:
# url: localhost:2181
# sessionTimeout: 5000
# connectionTimeout: 2000
# http:
# enabled: true
# nacos:
# url: localhost:8848
# namespace: 1c10d748-af86-43b9-8265-75f487d20c6c
# username:
# password:
# acm:
# enabled: false
# endpoint: acm.aliyun.com
# namespace:
# accessKey:
# secretKey:
# etcd:
# url: http://localhost:2379
# consul:
# url: http://localhost:8500
aes:
secret:
key: 2095132720951327
iv: 6075877187097700
ldap:
enabled: false
url: ldap://xxxx:xxx
bind-dn: cn=xxx,dc=xxx,dc=xxx
password: xxxx
base-dn: ou=xxx,dc=xxx,dc=xxx
object-class: person
login-field: cn
jwt:
expired-seconds: 86400000
shiro:
white-list:
- /
- /favicon.*
- /static/**
- /index**
- /plugin
- /platform/**
- /websocket
- /configs/**
- /shenyu-client/**
- /error
- /actuator/health
- /swagger-ui.html
- /webjars/**
- /swagger-resources/**
- /v2/api-docs
- /csrf
swagger:
enable: true
属性详解
shenyu.register 配置
这是客户端接入的相关配置,客户端接入原理请参考:客户端接入原理 ,客户端接入配置请参考: 客户端接入配置 。
| 名称 | 类型 | 默认值 | 是否必填 | 说明 |
|---|---|---|---|---|
| registerType | String | http | 必填 | 使用哪种方式进行服务注册,当前支持 http、zookeeper、etcd、consul和nacos 。 |
| serverLists | String | 无 | 非必填 | 配置中心的地址。使用http方式时,不需要填写,其他类型需要填写。集群时,多个地址用 , 分开 。 |
| props | 使用不同注册类型时,属性取值不同。 |
props配置
使用不同的注册类型时,属性取值不同。
当注册类型为http时,支持的属性配置如下:
| 名称 | 类型 | 默认值 | 是否必填 | 说明 |
|---|---|---|---|---|
| checked | boolean | false | 否 | 是否开启检测 |
| zombieCheckTimes | int | 5 | 否 |