diff --git a/pom.xml b/pom.xml
index a5e2bc5f..fef3b9f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,10 @@
1.8
1.8
+
+ 2.2.5.RELEASE
+ Hoxton.SR6
+ 1.4.1
2.3.5.RELEASE
1.2.76
3.3.1
@@ -52,6 +56,28 @@
+
+ com.alibaba.cloud
+ spring-cloud-alibaba-dependencies
+ ${alibaba.cloud.version}
+ pom
+ import
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring.cloud.version}
+ pom
+ import
+
+
+
+ com.alibaba.nacos
+ nacos-common
+ ${nacos.common.version}
+
mysql
diff --git a/virtual-patient-manage/pom.xml b/virtual-patient-manage/pom.xml
index 46fecf9f..eb948320 100644
--- a/virtual-patient-manage/pom.xml
+++ b/virtual-patient-manage/pom.xml
@@ -14,6 +14,31 @@
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba
+ fastjson
+
+
+ com.alibaba.nacos
+ nacos-common
+
+
+
+
+ com.alibaba.nacos
+ nacos-common
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
com.supervision
virtual-patient-model
diff --git a/virtual-patient-manage/src/main/java/com/supervision/manage/VirtualPatientManageApplication.java b/virtual-patient-manage/src/main/java/com/supervision/manage/VirtualPatientManageApplication.java
index f4fa85e6..b9160a39 100644
--- a/virtual-patient-manage/src/main/java/com/supervision/manage/VirtualPatientManageApplication.java
+++ b/virtual-patient-manage/src/main/java/com/supervision/manage/VirtualPatientManageApplication.java
@@ -3,12 +3,14 @@ package com.supervision.manage;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
@SpringBootApplication
@MapperScan(basePackages = {"com.supervision.**.mapper"})
@ComponentScan(basePackages = {"com.supervision.**"})
+@EnableDiscoveryClient
public class VirtualPatientManageApplication {
public static void main(String[] args) {
diff --git a/virtual-patient-manage/src/main/resources/application-dev.yml b/virtual-patient-manage/src/main/resources/application-dev.yml
deleted file mode 100644
index 09e18f51..00000000
--- a/virtual-patient-manage/src/main/resources/application-dev.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-#服务器端口
-server:
- port: 8891
- servlet:
- context-path: /virtual-patient-manage
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-spring:
- application:
- name: virtual-patient-manage
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.137:3306/virtual_patient?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
- redis:
- host: 192.168.10.137
- port: 6379
- password: 123456
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-
-minio:
- url: http://192.168.10.137:9002
- accessKey: admin
- secretKey: 12345678
- bucketName: virtual-patient-bucket-dev
\ No newline at end of file
diff --git a/virtual-patient-manage/src/main/resources/application-test.yml b/virtual-patient-manage/src/main/resources/application-test.yml
deleted file mode 100644
index 5541b1fe..00000000
--- a/virtual-patient-manage/src/main/resources/application-test.yml
+++ /dev/null
@@ -1,63 +0,0 @@
-#服务器端口
-server:
- port: 8891
- servlet:
- context-path: /virtual-patient-manage
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-
-spring:
- application:
- name: virtual-patient-manage
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.138:3306/virtual_patient_test?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
- redis:
- host: 192.168.10.138
- port: 6379
- password: 123456
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-minio:
- url: http://192.168.10.138:9002
- accessKey: admin
- secretKey: 12345678
- bucketName: virtual-patient-bucket-test
\ No newline at end of file
diff --git a/virtual-patient-manage/src/main/resources/application.yml b/virtual-patient-manage/src/main/resources/application.yml
index 027b4e36..8d8f4111 100644
--- a/virtual-patient-manage/src/main/resources/application.yml
+++ b/virtual-patient-manage/src/main/resources/application.yml
@@ -1,3 +1,48 @@
+#服务器端口
+server:
+ port: 8891
+ servlet:
+ context-path: /virtual-patient-manage
+ undertow:
+ # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
+ max-http-post-size: -1
+ # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
+ # 每块buffer的空间大小,越小的空间被利用越充分
+ buffer-size: 512
+ # 是否分配的直接内存
+ direct-buffers: true
+
spring:
- profiles:
- active: test
\ No newline at end of file
+ servlet:
+ multipart:
+ max-file-size: 100MB
+ max-request-size: 100MB
+ ##数据源配置
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ druid:
+ initial-size: 5 # 初始化大小
+ min-idle: 10 # 最小连接数
+ max-active: 20 # 最大连接数
+ max-wait: 60000 # 获取连接时的最大等待时间
+ min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
+ time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
+ filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
+ validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
+ test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
+ test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
+ test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
+ stat-view-servlet:
+ enabled: false # 是否开启 StatViewServlet
+ filter:
+ stat:
+ enabled: true # 是否开启 FilterStat,默认true
+ log-slow-sql: true # 是否开启 慢SQL 记录,默认false
+ slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
+ merge-sql: false # 合并多个连接池的监控数据,默认false
+
+
+mybatis-plus:
+ mapper-locations: classpath*:mapper/**/*.xml
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/virtual-patient-manage/src/main/resources/bootstrap-dev.yml b/virtual-patient-manage/src/main/resources/bootstrap-dev.yml
new file mode 100644
index 00000000..b43e8800
--- /dev/null
+++ b/virtual-patient-manage/src/main/resources/bootstrap-dev.yml
@@ -0,0 +1,10 @@
+spring:
+ cloud:
+ nacos:
+ config:
+ server-addr: 192.168.10.137:8848
+ file-extension: yml
+ namespace: b9eea377-79ec-4ba5-9cc2-354f7bd5181e
+ discovery:
+ server-addr: 192.168.10.137:8848
+ namespace: b9eea377-79ec-4ba5-9cc2-354f7bd5181e
diff --git a/virtual-patient-manage/src/main/resources/bootstrap-test.yml b/virtual-patient-manage/src/main/resources/bootstrap-test.yml
new file mode 100644
index 00000000..71468fab
--- /dev/null
+++ b/virtual-patient-manage/src/main/resources/bootstrap-test.yml
@@ -0,0 +1,10 @@
+spring:
+ cloud:
+ nacos:
+ config:
+ server-addr: 192.168.10.137:8848
+ file-extension: yml
+ namespace: 88e1f674-1fbc-4021-9ff1-60b94ee13ef0
+ discovery:
+ server-addr: 192.168.10.137:8848
+ namespace: 88e1f674-1fbc-4021-9ff1-60b94ee13ef0
\ No newline at end of file
diff --git a/virtual-patient-manage/src/main/resources/bootstrap.yml b/virtual-patient-manage/src/main/resources/bootstrap.yml
new file mode 100644
index 00000000..55945d90
--- /dev/null
+++ b/virtual-patient-manage/src/main/resources/bootstrap.yml
@@ -0,0 +1,5 @@
+spring:
+ profiles:
+ active: test
+ application:
+ name: virtual-patient-manage
\ No newline at end of file
diff --git a/virtual-patient-rasa/pom.xml b/virtual-patient-rasa/pom.xml
index f934f761..9f62f611 100644
--- a/virtual-patient-rasa/pom.xml
+++ b/virtual-patient-rasa/pom.xml
@@ -21,6 +21,30 @@
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba
+ fastjson
+
+
+ com.alibaba.nacos
+ nacos-common
+
+
+
+
+ com.alibaba.nacos
+ nacos-common
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
com.supervision
virtual-patient-common
diff --git a/virtual-patient-rasa/src/main/java/com/supervision/rasa/VirtualPatientRasaApplication.java b/virtual-patient-rasa/src/main/java/com/supervision/rasa/VirtualPatientRasaApplication.java
index 041efa1d..e83e6ec7 100644
--- a/virtual-patient-rasa/src/main/java/com/supervision/rasa/VirtualPatientRasaApplication.java
+++ b/virtual-patient-rasa/src/main/java/com/supervision/rasa/VirtualPatientRasaApplication.java
@@ -6,6 +6,7 @@ import com.supervision.rasa.service.Text2vecService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
@@ -16,6 +17,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@MapperScan(basePackages = {"com.supervision.**.mapper"})
// 排除JWT权限校验
@ComponentScan(basePackages = {"com.supervision"},excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {WebConfig.class}))
+@EnableDiscoveryClient
public class VirtualPatientRasaApplication {
public static void main(String[] args) {
diff --git a/virtual-patient-rasa/src/main/resources/application-dev.yml b/virtual-patient-rasa/src/main/resources/application-dev.yml
deleted file mode 100644
index cc3fc54d..00000000
--- a/virtual-patient-rasa/src/main/resources/application-dev.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-server:
- port: 8890
- servlet:
- context-path: /virtual-patient-rasa
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-rasa:
- data-path: /data/vp/rasa/model_resource/ # 文件解压后存放位置
- models-path: /data/vp/rasa/models/
- endpoints: /rasa/endpoints.yml # 启动的配置项,应该是写在配置文件里面
- config: /rasa/config.yml # 启动rasa需要的配置文件,在配置文件中配置
- url: 127.0.0.1:{}/webhooks/rest/webhook
- wakeup:
- cron: 0 */10 * * * ? #每十分钟执行一次
-
-text2vec:
- service:
- domain: http://127.0.0.1:5000/
-
-spring:
- application:
- name: virtual-patient
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
-
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.137:3306/virtual_patient?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/virtual-patient-rasa/src/main/resources/application-test.yml b/virtual-patient-rasa/src/main/resources/application-test.yml
deleted file mode 100644
index e0240095..00000000
--- a/virtual-patient-rasa/src/main/resources/application-test.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-server:
- port: 8890
- servlet:
- context-path: /virtual-patient-rasa
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-rasa:
- data-path: /data/vp/rasa/model_resource/ # 文件解压后存放位置
- models-path: /data/vp/rasa/models/
- endpoints: /rasa/endpoints.yml # 启动的配置项,应该是写在配置文件里面
- config: /rasa/config.yml # 启动rasa需要的配置文件,在配置文件中配置
- url: 127.0.0.1:{}/webhooks/rest/webhook
- wakeup:
- cron: 0 */10 * * * ? #每十分钟执行一次
-
-text2vec:
- service:
- domain: http://127.0.0.1:5000/
-
-spring:
- application:
- name: virtual-patient
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
-
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.138:3306/virtual_patient_test?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/virtual-patient-rasa/src/main/resources/application.yml b/virtual-patient-rasa/src/main/resources/application.yml
index caf4dfcd..02278bbf 100644
--- a/virtual-patient-rasa/src/main/resources/application.yml
+++ b/virtual-patient-rasa/src/main/resources/application.yml
@@ -1,3 +1,46 @@
+server:
+ port: 8890
+ servlet:
+ context-path: /virtual-patient-rasa
+ undertow:
+ # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
+ max-http-post-size: -1
+ # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
+ # 每块buffer的空间大小,越小的空间被利用越充分
+ buffer-size: 512
+ # 是否分配的直接内存
+ direct-buffers: true
+
spring:
- profiles:
- active: dev
\ No newline at end of file
+ servlet:
+ multipart:
+ max-file-size: 100MB
+ max-request-size: 100MB
+ ##数据源配置
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ druid:
+ initial-size: 5 # 初始化大小
+ min-idle: 10 # 最小连接数
+ max-active: 20 # 最大连接数
+ max-wait: 60000 # 获取连接时的最大等待时间
+ min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
+ time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
+ filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
+ validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
+ test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
+ test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
+ test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
+ stat-view-servlet:
+ enabled: false # 是否开启 StatViewServlet
+ filter:
+ stat:
+ enabled: true # 是否开启 FilterStat,默认true
+ log-slow-sql: true # 是否开启 慢SQL 记录,默认false
+ slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
+ merge-sql: false # 合并多个连接池的监控数据,默认false
+
+mybatis-plus:
+ mapper-locations: classpath*:mapper/**/*.xml
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/virtual-patient-rasa/src/main/resources/bootstrap-dev.yml b/virtual-patient-rasa/src/main/resources/bootstrap-dev.yml
new file mode 100644
index 00000000..b43e8800
--- /dev/null
+++ b/virtual-patient-rasa/src/main/resources/bootstrap-dev.yml
@@ -0,0 +1,10 @@
+spring:
+ cloud:
+ nacos:
+ config:
+ server-addr: 192.168.10.137:8848
+ file-extension: yml
+ namespace: b9eea377-79ec-4ba5-9cc2-354f7bd5181e
+ discovery:
+ server-addr: 192.168.10.137:8848
+ namespace: b9eea377-79ec-4ba5-9cc2-354f7bd5181e
diff --git a/virtual-patient-rasa/src/main/resources/bootstrap-test.yml b/virtual-patient-rasa/src/main/resources/bootstrap-test.yml
new file mode 100644
index 00000000..71468fab
--- /dev/null
+++ b/virtual-patient-rasa/src/main/resources/bootstrap-test.yml
@@ -0,0 +1,10 @@
+spring:
+ cloud:
+ nacos:
+ config:
+ server-addr: 192.168.10.137:8848
+ file-extension: yml
+ namespace: 88e1f674-1fbc-4021-9ff1-60b94ee13ef0
+ discovery:
+ server-addr: 192.168.10.137:8848
+ namespace: 88e1f674-1fbc-4021-9ff1-60b94ee13ef0
\ No newline at end of file
diff --git a/virtual-patient-rasa/src/main/resources/bootstrap.yml b/virtual-patient-rasa/src/main/resources/bootstrap.yml
new file mode 100644
index 00000000..2d92234b
--- /dev/null
+++ b/virtual-patient-rasa/src/main/resources/bootstrap.yml
@@ -0,0 +1,5 @@
+spring:
+ profiles:
+ active: test
+ application:
+ name: virtual-patient-rasa
\ No newline at end of file
diff --git a/virtual-patient-web/pom.xml b/virtual-patient-web/pom.xml
index 96573a46..54172159 100644
--- a/virtual-patient-web/pom.xml
+++ b/virtual-patient-web/pom.xml
@@ -18,6 +18,32 @@
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba
+ fastjson
+
+
+ com.alibaba.nacos
+ nacos-common
+
+
+
+
+ com.alibaba.nacos
+ nacos-common
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
com.supervision
virtual-patient-model
diff --git a/virtual-patient-web/src/main/java/com/supervision/VirtualPatientApplication.java b/virtual-patient-web/src/main/java/com/supervision/VirtualPatientApplication.java
index 58cf6d1d..1244c7a3 100644
--- a/virtual-patient-web/src/main/java/com/supervision/VirtualPatientApplication.java
+++ b/virtual-patient-web/src/main/java/com/supervision/VirtualPatientApplication.java
@@ -4,6 +4,7 @@ import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -11,8 +12,8 @@ import org.springframework.web.socket.config.annotation.EnableWebSocket;
@SpringBootApplication
@MapperScan(basePackages = {"com.supervision.**.mapper"})
-@EnableWebSocket
@EnableScheduling
+@EnableDiscoveryClient
public class VirtualPatientApplication {
public static void main(String[] args) {
diff --git a/virtual-patient-web/src/main/resources/application-dev.yml b/virtual-patient-web/src/main/resources/application-dev.yml
deleted file mode 100644
index f1587089..00000000
--- a/virtual-patient-web/src/main/resources/application-dev.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-#服务器端口
-server:
- port: 8899
- servlet:
- context-path: /virtual-patient
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-spring:
- application:
- name: virtual-patient
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.137:3306/virtual_patient?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
- redis:
- host: 192.168.10.137
- port: 6379
- password: 123456
-
-minio:
- url: http://192.168.10.137:9002
- accessKey: admin
- secretKey: 12345678
- bucketName: virtual-patient-bucket-dev
-
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-
-paddle-speech:
- # https://github.com/PaddlePaddle/PaddleSpeech/wiki/PaddleSpeech-Server-RESTful-API
- tts: http://192.168.10.137:8090/paddlespeech/tts
- asr: http://192.168.10.137:8090/paddlespeech/asr
-rasa:
- base-url: http://192.168.10.137:8890/virtual-patient-rasa/
- talk: rasa/talkRasa
- saveRasaFile: rasaFile/saveRasaFile
- train: rasaCmd/trainExec
- run: rasaCmd/runExec
-human:
- base-url: https://digital-human.jd.com
- room-id: /getRoomId
- text-driven: /text_driven
- talk-status: /talkStatus
- resourceMaxNumber: 5
-answer:
- # 对于没有匹配上的缺省回答ID,关联的是vp_file_resource的ID
- defaultNoMatchId: 1739173836351885313
- defaultNoMatchAnswerMessage: 你好,医生
\ No newline at end of file
diff --git a/virtual-patient-web/src/main/resources/application-local.yml b/virtual-patient-web/src/main/resources/application-local.yml
deleted file mode 100644
index 2e51914d..00000000
--- a/virtual-patient-web/src/main/resources/application-local.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-#服务器端口
-server:
- port: 8899
- servlet:
- context-path: /virtual-patient
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-spring:
- application:
- name: virtual-patient
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.138:3306/virtual_patient?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
- redis:
- host: 192.168.10.137
- port: 6379
- password: 123456
-
-minio:
- url: http://192.168.10.138:9002
- accessKey: admin
- secretKey: 12345678
- bucketName: virtual-patient-bucket-dev
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-
-paddle-speech:
- # https://github.com/PaddlePaddle/PaddleSpeech/wiki/PaddleSpeech-Server-RESTful-API
- tts: http://192.168.10.137:8090/paddlespeech/tts
- asr: http://192.168.10.137:8090/paddlespeech/asr
-rasa:
- base-url: http://192.168.10.138:8890/virtual-patient-rasa/
- talk: rasa/talkRasa
- saveRasaFile: rasaFile/saveRasaFile
- train: rasaCmd/trainExec
- run: rasaCmd/runExec
-human:
- base-url: https://digital-human.jd.com
- room-id: /getRoomId
- text-driven: /text_driven
- talk-status: /talkStatus
- resourceMaxNumber: 5
-
-answer:
- # 对于没有匹配上的缺省回答ID,关联的是vp_file_resource的ID
- defaultNoMatchId: 1739173836351885313
- defaultNoMatchAnswerMessage: 你好,医生
\ No newline at end of file
diff --git a/virtual-patient-web/src/main/resources/application-test.yml b/virtual-patient-web/src/main/resources/application-test.yml
deleted file mode 100644
index 9b57263c..00000000
--- a/virtual-patient-web/src/main/resources/application-test.yml
+++ /dev/null
@@ -1,89 +0,0 @@
-#服务器端口
-server:
- port: 8899
- servlet:
- context-path: /virtual-patient
- undertow:
- # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
- max-http-post-size: -1
- # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
- # 每块buffer的空间大小,越小的空间被利用越充分
- buffer-size: 512
- # 是否分配的直接内存
- direct-buffers: true
-
-
-spring:
- application:
- name: virtual-patient
- servlet:
- multipart:
- max-file-size: 100MB
- max-request-size: 100MB
- ##数据源配置
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- druid:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://192.168.10.138:3306/virtual_patient_test?useUnicode=true&characterEncoding=utf-8&useSSL=true&nullCatalogMeansCurrent=true&serverTimezone=GMT%2B8
- username: root
- password: '123456'
- initial-size: 5 # 初始化大小
- min-idle: 10 # 最小连接数
- max-active: 20 # 最大连接数
- max-wait: 60000 # 获取连接时的最大等待时间
- min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
- time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
- filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
- validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
- test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
- test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
- test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
- stat-view-servlet:
- enabled: false # 是否开启 StatViewServlet
- filter:
- stat:
- enabled: true # 是否开启 FilterStat,默认true
- log-slow-sql: true # 是否开启 慢SQL 记录,默认false
- slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
- merge-sql: false # 合并多个连接池的监控数据,默认false
- redis:
- host: 192.168.10.138
- port: 6379
- password: 123456
-
-minio:
- url: http://192.168.10.138:9002
- accessKey: admin
- secretKey: 12345678
- bucketName: virtual-patient-bucket-test
-
-mybatis-plus:
- mapper-locations: classpath*:mapper/**/*.xml
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-
-paddle-speech:
- # https://github.com/PaddlePaddle/PaddleSpeech/wiki/PaddleSpeech-Server-RESTful-API
- tts: http://192.168.10.138:8090/paddlespeech/tts
- asr: http://192.168.10.138:8090/paddlespeech/asr
-rasa:
- base-url: http://192.168.10.138:8790/virtual-patient-rasa/
- talk: rasa/talkRasa
- saveRasaFile: rasaFile/saveRasaFile
- train: rasaCmd/trainExec
- run: rasaCmd/runExec
-human:
- base-url: https://digital-human.jd.com
- room-id: /getRoomId
- text-driven: /text_driven
- talk-status: /talkStatus
- resourceMaxNumber: 5
-ws:
- # nginx的wss地址(如果是wss的,那么带不带s都可以访问)
- nginx-ip: 192.168.10.138
- nginx-port: 443
-answer:
- # 对于没有匹配上的缺省回答ID,关联的是vp_file_resource的ID
- defaultNoMatchId: 1739945100730986498
- defaultNoMatchAnswerMessage: 你好,医生
\ No newline at end of file
diff --git a/virtual-patient-web/src/main/resources/application.yml b/virtual-patient-web/src/main/resources/application.yml
index ef46c2ad..1ed209a9 100644
--- a/virtual-patient-web/src/main/resources/application.yml
+++ b/virtual-patient-web/src/main/resources/application.yml
@@ -1,3 +1,46 @@
+#服务器端口
+server:
+ port: 8899
+ servlet:
+ context-path: /virtual-patient
+ undertow:
+ # HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
+ max-http-post-size: -1
+ # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
+ # 每块buffer的空间大小,越小的空间被利用越充分
+ buffer-size: 512
+ # 是否分配的直接内存
+ direct-buffers: true
spring:
- profiles:
- active: local
\ No newline at end of file
+ servlet:
+ multipart:
+ max-file-size: 100MB
+ max-request-size: 100MB
+ ##数据源配置
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ druid:
+ initial-size: 5 # 初始化大小
+ min-idle: 10 # 最小连接数
+ max-active: 20 # 最大连接数
+ max-wait: 60000 # 获取连接时的最大等待时间
+ min-evictable-idle-time-millis: 300000 # 一个连接在池中最小生存的时间,单位是毫秒
+ time-between-eviction-runs-millis: 60000 # 多久才进行一次检测需要关闭的空闲连接,单位是毫秒
+ filters: stat,wall # 配置扩展插件:stat-监控统计,log4j-日志,wall-防火墙(防止SQL注入),去掉后,监控界面的sql无法统计
+ validation-query: SELECT 1 # 检测连接是否有效的 SQL语句,为空时以下三个配置均无效
+ test-on-borrow: true # 申请连接时执行validationQuery检测连接是否有效,默认true,开启后会降低性能
+ test-on-return: true # 归还连接时执行validationQuery检测连接是否有效,默认false,开启后会降低性能
+ test-while-idle: true # 申请连接时如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效,默认false,建议开启,不影响性能
+ stat-view-servlet:
+ enabled: false # 是否开启 StatViewServlet
+ filter:
+ stat:
+ enabled: true # 是否开启 FilterStat,默认true
+ log-slow-sql: true # 是否开启 慢SQL 记录,默认false
+ slow-sql-millis: 5000 # 慢 SQL 的标准,默认 3000,单位:毫秒
+ merge-sql: false # 合并多个连接池的监控数据,默认false
+
+mybatis-plus:
+ mapper-locations: classpath*:mapper/**/*.xml
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
\ No newline at end of file
diff --git a/virtual-patient-web/src/main/resources/bootstrap-dev.yml b/virtual-patient-web/src/main/resources/bootstrap-dev.yml
new file mode 100644
index 00000000..e671cab3
--- /dev/null
+++ b/virtual-patient-web/src/main/resources/bootstrap-dev.yml
@@ -0,0 +1,10 @@
+spring:
+ cloud:
+ nacos:
+ config:
+ server-addr: 192.168.10.137:8848
+ file-extension: yml
+ namespace: b9eea377-79ec-4ba5-9cc2-354f7bd5181e
+ discovery:
+ server-addr: 192.168.10.137:8848
+ namespace: b9eea377-79ec-4ba5-9cc2-354f7bd5181e
\ No newline at end of file
diff --git a/virtual-patient-web/src/main/resources/bootstrap-test.yml b/virtual-patient-web/src/main/resources/bootstrap-test.yml
new file mode 100644
index 00000000..71468fab
--- /dev/null
+++ b/virtual-patient-web/src/main/resources/bootstrap-test.yml
@@ -0,0 +1,10 @@
+spring:
+ cloud:
+ nacos:
+ config:
+ server-addr: 192.168.10.137:8848
+ file-extension: yml
+ namespace: 88e1f674-1fbc-4021-9ff1-60b94ee13ef0
+ discovery:
+ server-addr: 192.168.10.137:8848
+ namespace: 88e1f674-1fbc-4021-9ff1-60b94ee13ef0
\ No newline at end of file
diff --git a/virtual-patient-web/src/main/resources/bootstrap.yml b/virtual-patient-web/src/main/resources/bootstrap.yml
new file mode 100644
index 00000000..09f83caa
--- /dev/null
+++ b/virtual-patient-web/src/main/resources/bootstrap.yml
@@ -0,0 +1,5 @@
+spring:
+ profiles:
+ active: test
+ application:
+ name: virtual-patient-web
\ No newline at end of file