From 343016494b9e7d29811351d2a57ad51a4d0fe92e Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Wed, 27 Jan 2021 21:45:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0websocket=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...dditional-spring-configuration-metadata.json | 17 ++++++++++++++++- src/main/resources/application-local.yml | 2 +- src/main/resources/application.yml | 3 ++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 79023a4c..dfc954cd 100644 --- a/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -24,6 +24,21 @@ "name": "spring.datasource.max-pool-prepared-statement-per-connection-size", "type": "java.lang.String", "description": "Description for spring.datasource.max-pool-prepared-statement-per-connection-size." + }, + { + "name": "web-socket.open", + "type": "java.lang.String", + "description": "Description for web-socket.open." + }, + { + "name": "prometheus.url", + "type": "java.lang.String", + "description": "Description for prometheus.url." + }, + { + "name": "prometheus.instance", + "type": "java.lang.String", + "description": "Description for prometheus.instance." } ] -} \ No newline at end of file +} diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml index a2656620..ea7cbe37 100644 --- a/src/main/resources/application-local.yml +++ b/src/main/resources/application-local.yml @@ -4,7 +4,7 @@ spring: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/guns?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT username: root - password: root + password: 123456 # 连接池大小根据实际情况调整 max-active: 100 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 7d9d403f..4ab8afc7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -68,6 +68,7 @@ prometheus: url: http://localhost:9090/api/v1/ # 非必须配置项 instance: + +# 是否开启websocket推送消息 web-socket: open: true - ws-url: ws://localhost:${server.port}/message/websocket/{userId}