Skip to content

Commit d886164

Browse files
authored
refactor: Configuration files uniformly use Kebab style (#5262)
* refactor: Configuration files uniformly use Kebab style * fix: misspelling * fix:add CHANGES.md
1 parent ced6383 commit d886164

18 files changed

+129
-128
lines changed

Diff for: CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Apollo 2.4.0
1515
* [Feature add limit for items count per namespace](https://github.com/apolloconfig/apollo/pull/5227)
1616
* [Feature: Add ConfigService cache record stats function](https://github.com/apolloconfig/apollo/pull/5247)
1717
* [RefreshAdminServerAddressTask supports dynamic configuration of time interval](https://github.com/apolloconfig/apollo/pull/5248)
18+
* [Refactor: Configuration files uniformly use Kebab style](https://github.com/apolloconfig/apollo/pull/5262)
1819

1920
------------------
2021
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/15?closed=1)

Diff for: apollo-adminservice/src/main/resources/application-database-discovery.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ spring.cloud.discovery.enabled=false
1818

1919
apollo.service.registry.enabled=true
2020
apollo.service.registry.cluster=default
21-
apollo.service.registry.heartbeatIntervalInSecond=10
21+
apollo.service.registry.heartbeat-interval-in-second=10
2222

Diff for: apollo-adminservice/src/main/resources/application.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ logging:
3838
eureka:
3939
instance:
4040
hostname: ${hostname:localhost}
41-
preferIpAddress: true
41+
prefer-ip-address: true
4242
status-page-url-path: /info
4343
health-check-url-path: /health
4444
client:
45-
serviceUrl:
45+
service-url:
4646
# This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property
4747
# see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig
4848
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
4949
healthcheck:
5050
enabled: true
51-
eurekaServiceUrlPollIntervalSeconds: 60
51+
eureka-service-url-poll-interval-seconds: 60
5252

5353
management:
5454
health:

Diff for: apollo-adminservice/src/test/resources/application.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ server:
2323
eureka:
2424
instance:
2525
hostname: ${hostname:localhost}
26-
preferIpAddress: true
26+
prefer-ip-address: true
2727
status-page-url-path: /info
2828
health-check-url-path: /health
2929
client:
30-
serviceUrl:
30+
service-url:
3131
defaultZone: http://${eureka.instance.hostname}:8090/eureka/
3232
healthcheck:
3333
enabled: true

Diff for: apollo-assembly/src/main/resources/application-database-discovery.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ spring.cloud.discovery.enabled=false
1919

2020
apollo.service.registry.enabled=true
2121
apollo.service.registry.cluster=default
22-
apollo.service.registry.heartbeatIntervalInSecond=10
22+
apollo.service.registry.heartbeat-interval-in-second=10
2323

2424
apollo.service.discovery.enabled=true
2525
# health check by heartbeat, heartbeat time before 61s ago will be seemed as unhealthy
26-
apollo.service.discovery.healthCheckIntervalInSecond = 61
26+
apollo.service.discovery.health-check-interval-in-second = 61

Diff for: apollo-assembly/src/main/resources/application.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ management:
4242
eureka:
4343
instance:
4444
hostname: ${hostname:localhost}
45-
preferIpAddress: true
45+
prefer-ip-address: true
4646
status-page-url-path: /info
4747
health-check-url-path: /health
4848
server:
49-
peerEurekaNodesUpdateIntervalMs: 60000
50-
enableSelfPreservation: false
49+
peer-eureka-nodes-update-interval-ms: 60000
50+
enable-self-preservation: false
5151
client:
52-
serviceUrl:
52+
service-url:
5353
# This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property
5454
# see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig
5555
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
5656
healthcheck:
5757
enabled: true
58-
eurekaServiceUrlPollIntervalSeconds: 60
58+
eureka-service-url-poll-interval-seconds: 60
5959
fetch-registry: false
60-
registerWithEureka: false
60+
register-with-eureka: false
6161

6262
server:
6363
compression:

Diff for: apollo-configservice/src/main/resources/application-database-discovery.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ spring.cloud.discovery.enabled=false
1919

2020
apollo.service.registry.enabled=true
2121
apollo.service.registry.cluster=default
22-
apollo.service.registry.heartbeatIntervalInSecond=10
22+
apollo.service.registry.heartbeat-interval-in-second=10
2323

2424
apollo.service.discovery.enabled=true
2525
# health check by heartbeat, heartbeat time before 61s ago will be seemed as unhealthy
26-
apollo.service.discovery.healthCheckIntervalInSecond = 61
26+
apollo.service.discovery.health-check-interval-in-second = 61

Diff for: apollo-configservice/src/main/resources/application.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@ logging:
3838
eureka:
3939
instance:
4040
hostname: ${hostname:localhost}
41-
preferIpAddress: true
41+
prefer-ip-address: true
4242
status-page-url-path: /info
4343
health-check-url-path: /health
4444
server:
45-
peerEurekaNodesUpdateIntervalMs: 60000
46-
enableSelfPreservation: false
45+
peer-eureka-nodes-update-interval-ms: 60000
46+
enable-self-preservation: false
4747
client:
48-
serviceUrl:
48+
service-url:
4949
# This setting will be overridden by eureka.service.url setting from ApolloConfigDB.ServerConfig or System Property
5050
# see com.ctrip.framework.apollo.biz.eureka.ApolloEurekaClientConfig
5151
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
5252
healthcheck:
5353
enabled: true
54-
eurekaServiceUrlPollIntervalSeconds: 60
54+
eureka-service-url-poll-interval-seconds: 60
5555
fetch-registry: false
56-
registerWithEureka: false
56+
register-with-eureka: false
5757

5858
management:
5959
health:

Diff for: apollo-configservice/src/test/resources/application.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ server:
2323
eureka:
2424
instance:
2525
hostname: ${hostname:localhost}
26-
preferIpAddress: true
26+
prefer-ip-address: true
2727
status-page-url-path: /info
2828
health-check-url-path: /health
2929
client:
30-
serviceUrl:
30+
service-url:
3131
defaultZone: http://${eureka.instance.hostname}:8080/eureka/
3232
healthcheck:
3333
enabled: true

Diff for: apollo-portal/src/main/resources/application-ldap-activedirectory-sample.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ spring:
1919
base: "dc=example,dc=com"
2020
username: "admin" # 配置管理员账号,用于搜索、匹配用户
2121
password: "password"
22-
searchFilter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
22+
search-filter: "(sAMAccountName={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
2323
urls:
2424
- "ldap://1.1.1.1:389"
2525

2626
ldap:
2727
mapping: # 配置 ldap 属性
28-
objectClass: "user" # ldap 用户 objectClass 配置
29-
loginId: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id
30-
userDisplayName: "cn" # ldap 用户名,用来作为显示名
28+
object-class: "user" # ldap 用户 objectClass 配置
29+
login-id: "sAMAccountName" # ldap 用户惟一 id,用来作为登录的 id
30+
user-display-name: "cn" # ldap 用户名,用来作为显示名
3131
email: "userPrincipalName" # ldap 邮箱属性
3232
# filter: # 可选项,配置过滤,目前只支持 memberOf
3333
# memberOf: "CN=ServiceDEV,OU=test,DC=example,DC=com|CN=WebDEV,OU=test,DC=example,DC=com" # 只允许 memberOf 属性为 ServiceDEV 和 WebDEV 的用户访问

Diff for: apollo-portal/src/main/resources/application-ldap-apacheds-sample.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ spring:
1919
base: "dc=example,dc=com"
2020
username: "uid=admin,ou=system" # 配置管理员账号,用于搜索、匹配用户
2121
password: "password"
22-
searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
22+
search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
2323
urls:
2424
- "ldap://localhost:10389"
2525

2626
ldap:
2727
mapping: # 配置 ldap 属性
28-
objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置
29-
loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id
30-
rdnKey: "cn" # ldap rdn key,可选项,如需启用group search需要配置
31-
userDisplayName: "displayName" # ldap 用户名,用来作为显示名
28+
object-class: "inetOrgPerson" # ldap 用户 objectClass 配置
29+
login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id
30+
rdn-key: "cn" # ldap rdn key,可选项,如需启用group search需要配置
31+
user-display-name: "displayName" # ldap 用户名,用来作为显示名
3232
email: "mail" # ldap 邮箱属性
3333
# group: # 配置ldap group,可选配置,启用后只有特定group的用户可以登录apollo
34-
# objectClass: "groupOfNames" # 配置groupClassName
35-
# groupBase: "ou=group" # group search base
36-
# groupSearch: "(&(cn=dev))" # group filter
37-
# groupMembership: "member" # group memberShip eg. member or memberUid
34+
# object-class: "groupOfNames" # 配置groupClassName
35+
# group-base: "ou=group" # group search base
36+
# group-search: "(&(cn=dev))" # group filter
37+
# group-membership: "member" # group memberShip eg. member or memberUid

Diff for: apollo-portal/src/main/resources/application-ldap-openldap-sample.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ spring:
1919
base: "dc=example,dc=org"
2020
username: "cn=admin,dc=example,dc=org" # 配置管理员账号,用于搜索、匹配用户
2121
password: "password"
22-
searchFilter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
22+
search-filter: "(uid={0})" # 用户过滤器,登录的时候用这个过滤器来搜索用户
2323
urls:
2424
- "ldap://localhost:389"
2525

2626
ldap:
2727
mapping: # 配置 ldap 属性
28-
objectClass: "inetOrgPerson" # ldap 用户 objectClass 配置
29-
loginId: "uid" # ldap 用户惟一 id,用来作为登录的 id
30-
rdnKey: "uid" # ldap rdn key,可选项,如需启用group search需要配置
31-
userDisplayName: "cn" # ldap 用户名,用来作为显示名
28+
object-class: "inetOrgPerson" # ldap 用户 objectClass 配置
29+
login-id: "uid" # ldap 用户惟一 id,用来作为登录的 id
30+
rdn-key: "uid" # ldap rdn key,可选项,如需启用group search需要配置
31+
user-display-name: "cn" # ldap 用户名,用来作为显示名
3232
email: "mail" # ldap 邮箱属性
3333
# group: # 启用group search,可选配置,启用后只有特定group的用户可以登录apollo
34-
# objectClass: "posixGroup" # 配置groupClassName
35-
# groupBase: "ou=group" # group search base
36-
# groupSearch: "(&(cn=dev))" # group filter
37-
# groupMembership: "memberUid" # group memberShip eg. member or memberUid
34+
# object-class: "posixGroup" # 配置groupClassName
35+
# group-base: "ou=group" # group search base
36+
# group-search: "(&(cn=dev))" # group filter
37+
# group-membership: "memberUid" # group memberShip eg. member or memberUid

Diff for: docs/en/client/java-sdk-user-guide.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1105,13 +1105,13 @@ server.port = 8080
11051105

11061106
logging.level = ERROR
11071107

1108-
eureka.client.serviceUrl.defaultZone = http://127.0.0.1:8761/eureka/
1108+
eureka.client.service-url.defaultZone = http://127.0.0.1:8761/eureka/
11091109
eureka.client.healthcheck.enabled=true
1110-
eureka.client.registerWithEureka = true
1111-
eureka.client.fetchRegistry = true
1112-
eureka.client.eurekaServiceUrlPollIntervalSeconds = 60
1110+
eureka.client.register-with-eureka = true
1111+
eureka.client.fetch-registry = true
1112+
eureka.client.eureka-service-url-poll-interval-seconds = 60
11131113

1114-
eureka.instance.preferIpAddress = true
1114+
eureka.instance.prefer-ip-address = true
11151115
```
11161116

11171117
![text-mode-spring-boot-config-sample](https://cdn.jsdelivr.net/gh/apolloconfig/apollo@master/doc/images/text-mode-spring-boot-config-sample.png )

Diff for: docs/en/deployment/distributed-deployment-guide.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1302,14 +1302,14 @@ config:
13021302
base: "dc=example,dc=org"
13031303
username: "cn=admin,dc=example,dc=org"
13041304
password: "password"
1305-
searchFilter: "(uid={0})"
1305+
search-filter: "(uid={0})"
13061306
urls:
13071307
- "ldap://xxx.somedomain.com:389"
13081308
ldap:
13091309
mapping:
1310-
objectClass: "inetOrgPerson"
1311-
loginId: "uid"
1312-
userDisplayName: "cn"
1310+
object-class: "inetOrgPerson"
1311+
login-id: "uid"
1312+
user-display-name: "cn"
13131313
email: "mail"
13141314
```
13151315

0 commit comments

Comments
 (0)