diff --git a/cim-client/src/main/resources/application.properties b/cim-client/src/main/resources/application.properties deleted file mode 100644 index 971fe565..00000000 --- a/cim-client/src/main/resources/application.properties +++ /dev/null @@ -1,27 +0,0 @@ -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 suggested that this is Nginx address -cim.route.url = http://localhost:8083 - -# cim userId and userName -cim.user.id=1586617710861 -cim.user.userName=zhangsan - -cim.callback.thread.queue.size = 2 -cim.callback.thread.pool.size = 2 - -# cim heartbeat time(seconds) -cim.heartbeat.time = 60 - -cim.reconnect.count =3 \ No newline at end of file diff --git a/cim-client/src/main/resources/application.yaml b/cim-client/src/main/resources/application.yaml new file mode 100644 index 00000000..f1b92859 --- /dev/null +++ b/cim-client/src/main/resources/application.yaml @@ -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 \ No newline at end of file diff --git a/cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/AppConfiguration.java b/cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/AppConfiguration.java index 489032c5..8aeefea1 100644 --- a/cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/AppConfiguration.java +++ b/cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/AppConfiguration.java @@ -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}") diff --git a/cim-forward-route/src/main/resources/application.properties b/cim-forward-route/src/main/resources/application.properties deleted file mode 100644 index 0fec3896..00000000 --- a/cim-forward-route/src/main/resources/application.properties +++ /dev/null @@ -1,36 +0,0 @@ -spring.application.name=cim-forward-route - -# web port -server.port=8083 - -logging.level.root=info - -# enable swagger -springdoc.swagger-ui.enabled = true - - -app.zk.addr=127.0.0.1:2181 - -app.zk.connect.timeout=15000 - -app.zk.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 -app.route.way=com.crossoverjie.cim.common.route.algorithm.consistenthash.ConsistentHashHandle - -#app.route.way.consitenthash=com.crossoverjie.cim.common.route.algorithm.consistenthash.SortArrayMapConsistentHash - -app.route.way.consitenthash=com.crossoverjie.cim.common.route.algorithm.consistenthash.TreeMapConsistentHash - -spring.data.redis.host=127.0.0.1 -spring.data.redis.port=6379 -spring.data.redis.jedis.pool.max-active=100 -spring.data.redis.jedis.pool.max-idle=100 -spring.data.redis.jedis.pool.max-wait=1000 -spring.data.redis.jedis.pool.min-idle=10 diff --git a/cim-forward-route/src/main/resources/application.yaml b/cim-forward-route/src/main/resources/application.yaml new file mode 100644 index 00000000..0280fef9 --- /dev/null +++ b/cim-forward-route/src/main/resources/application.yaml @@ -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 + + diff --git a/cim-server/src/main/resources/application.properties b/cim-server/src/main/resources/application.properties deleted file mode 100644 index 09dc2c20..00000000 --- a/cim-server/src/main/resources/application.properties +++ /dev/null @@ -1,28 +0,0 @@ -spring.application.name=cim-server - -# web port -server.port=8081 - -# enable swagger -springdoc.swagger-ui.enabled = true - -# cim ????? -cim.server.port=11211 - -logging.level.root=info - -# enable zk -app.zk.switch=true - -app.zk.addr=127.0.0.1:2181 - -app.zk.connect.timeout=15000 - -# zk root path -app.zk.root=/route - -# route url suggested that this is Nginx address -cim.route.url=http://localhost:8083/ - -# cim heartbeat time(seconds) -cim.heartbeat.time = 30 \ No newline at end of file diff --git a/cim-server/src/main/resources/application.yaml b/cim-server/src/main/resources/application.yaml new file mode 100644 index 00000000..fbdb0f52 --- /dev/null +++ b/cim-server/src/main/resources/application.yaml @@ -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 server config +cim: + server: + port: 11211 + route: + url: http://localhost:8083/ # route url suggested that this is Nginx address + heartbeat: + time: 30 # cim heartbeat time(seconds) \ No newline at end of file