Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use application.yaml instead of application.properties #138

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions cim-client/src/main/resources/application.properties

This file was deleted.

37 changes: 37 additions & 0 deletions cim-client/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
spring:
application:
name: cim-client

# web port
server:
port: 8082

logging:
level:
root: error

# enable swagger
springdoc:
swagger-ui:
enabled: true

# log path
cim:
msg:
logger:
path: /opt/logs/cim/
route:
url: http://localhost:8083 # route url suggested that this is Nginx address
user: # cim userId and userName
id: 1722343979085
userName: zhangsan
callback:
thread:
queue:
size: 2
pool:
size: 2
heartbeat:
time: 60 # cim heartbeat time (seconds)
reconnect:
count: 3
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AppConfiguration {
@Value("${app.zk.connect.timeout}")
private int zkConnectTimeout;

@Value("${app.route.way}")
@Value("${app.route.way.handler}")
private String routeWay;

@Value("${app.route.way.consitenthash}")
Expand Down
36 changes: 0 additions & 36 deletions cim-forward-route/src/main/resources/application.properties

This file was deleted.

49 changes: 49 additions & 0 deletions cim-forward-route/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
spring:
application:
name: cim-forward-route
data:
redis:
host: 127.0.0.1
port: 6379
jedis:
pool:
max-active: 100
max-idle: 100
max-wait: 1000
min-idle: 10
# web port
server:
port: 8083

logging:
level:
root: info

# enable swagger
springdoc:
swagger-ui:
enabled: true

app:
zk:
addr: 127.0.0.1:2181
connect:
timeout: 30000
root: /route

# route strategy
#app.route.way=com.crossoverjie.cim.common.route.algorithm.loop.LoopHandle

# route strategy
#app.route.way=com.crossoverjie.cim.common.route.algorithm.random.RandomHandle

# route strategy
route:
way:
handler: com.crossoverjie.cim.common.route.algorithm.consistenthash.ConsistentHashHandle

#app.route.way.consitenthash=com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHash

consitenthash: com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHash


28 changes: 0 additions & 28 deletions cim-server/src/main/resources/application.properties

This file was deleted.

34 changes: 34 additions & 0 deletions cim-server/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
spring:
application:
name:
cim-server

# web port
server:
port: 8081

# enable swagger
springdoc:
swagger-ui:
enabled: true

logging:
level:
root: info

# enable zk
app:
zk:
switch: true
addr: 127.0.0.1:2181
connect:
timeout: 30000
root: /route # zk root path
# cim ?????
baiyina marked this conversation as resolved.
Show resolved Hide resolved
cim:
server:
port: 11211
route:
url: http://localhost:8083/ # route url suggested that this is Nginx address
heartbeat:
time: 30 # cim heartbeat time(seconds)