From a01d41004165f9206f02cd49ee763066b05a6c70 Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 21 Sep 2023 20:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=80=E5=88=86=E9=96=8B=E7=99=BC=E3=80=81?= =?UTF-8?q?=E6=B8=AC=E8=A9=A6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap-dev.yml | 37 +++++++++++++ .../src/main/resources/bootstrap-test.yml | 14 +++++ .../src/main/resources/bootstrap.yml | 55 +------------------ .../src/main/resources/bootstrap-dev.yml | 37 +++++++++++++ .../src/main/resources/bootstrap-test.yml | 14 +++++ .../src/main/resources/bootstrap.yml | 15 +---- .../src/main/resources/bootstrap-dev.yml | 37 +++++++++++++ .../src/main/resources/bootstrap-test.yml | 14 +++++ .../src/main/resources/bootstrap.yml | 15 +---- logs/iot-box-websocket-api/error.log | 4 ++ logs/iot-box-websocket-api/info.log | 4 ++ logs/iot-box-websocket-api/warn.log | 4 ++ 12 files changed, 169 insertions(+), 81 deletions(-) create mode 100644 iot-modules/iot-admin-http-api/src/main/resources/bootstrap-dev.yml create mode 100644 iot-modules/iot-admin-http-api/src/main/resources/bootstrap-test.yml create mode 100644 iot-modules/iot-box-user-api/src/main/resources/bootstrap-dev.yml create mode 100644 iot-modules/iot-box-user-api/src/main/resources/bootstrap-test.yml create mode 100644 iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-dev.yml create mode 100644 iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-test.yml diff --git a/iot-modules/iot-admin-http-api/src/main/resources/bootstrap-dev.yml b/iot-modules/iot-admin-http-api/src/main/resources/bootstrap-dev.yml new file mode 100644 index 0000000..8f918c6 --- /dev/null +++ b/iot-modules/iot-admin-http-api/src/main/resources/bootstrap-dev.yml @@ -0,0 +1,37 @@ +spring: + cloud: + config: + # 如果本地配置优先级高,那么 override-none 设置为 true,包括系统环境变量、本地配置文件等配置 + override-none: true + # 如果想要远程配置优先级高,那么 allow-override 设置为 false,如果想要本地配置优先级高那么 allow-override 设置为 true + allow-override: true + # 只有系统环境变量或者系统属性才能覆盖远程配置文件的配置,本地配置文件中配置优先级低于远程配置;注意本地配置文件不是系统属性 + override-system-properties: false + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.8.146:32470 + config: + # 配置中心地址 + server-addr: 192.168.8.146:32470 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + r2dbc: + #注意下面修改 easyorm相关也需要修改 + #url: r2dbc:postgresql://localhost:5432/postgres #postgresql请使用此配置 + url: r2dbc:mysql://192.168.8.146:30416/qiuguo_iot?ssl=false&serverZoneId=Asia/Shanghai # mysql请使用此配置 + #url: r2dbc:h2:file:///./data/h2db/jetlinks + username: root + password: 123456 + redis: + # cluster: + # nodes: + # - 127.0.0.1:7001 + # - 127.0.0.1:7002 + host: 192.168.8.146 + port: 32030 + password: 123456 + timeout: 5000 \ No newline at end of file diff --git a/iot-modules/iot-admin-http-api/src/main/resources/bootstrap-test.yml b/iot-modules/iot-admin-http-api/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..8006c47 --- /dev/null +++ b/iot-modules/iot-admin-http-api/src/main/resources/bootstrap-test.yml @@ -0,0 +1,14 @@ +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: iot-nacos.qiuguo-iot:8848 + config: + # 配置中心地址 + server-addr: iot-nacos.qiuguo-iot:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} \ No newline at end of file diff --git a/iot-modules/iot-admin-http-api/src/main/resources/bootstrap.yml b/iot-modules/iot-admin-http-api/src/main/resources/bootstrap.yml index f2577db..4fd8fc2 100644 --- a/iot-modules/iot-admin-http-api/src/main/resources/bootstrap.yml +++ b/iot-modules/iot-admin-http-api/src/main/resources/bootstrap.yml @@ -1,59 +1,8 @@ server: - port: 8091 + port: 8080 spring: profiles: # 环境配置 active: dev application: - name: qiuguo-iot-admin-http-api - cloud: - nacos: - discovery: - # 服务注册地址 - server-addr: 192.168.8.101:8848 - config: - # 配置中心地址 - server-addr: 192.168.8.101:8848 - # 配置文件格式 - file-extension: yml - # 共享配置 - shared-configs: - - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - redis: - # cluster: - # nodes: - # - 127.0.0.1:7001 - # - 127.0.0.1:7002 - host: 192.168.8.101 - port: 6379 - password: 123456 - timeout: 5000 - r2dbc: - #注意下面修改 easyorm相关也需要修改 - #url: r2dbc:postgresql://localhost:5432/postgres #postgresql请使用此配置 - url: r2dbc:mysql://172.24.218.235:3306/qiuguo_iot?ssl=false&serverZoneId=Asia/Shanghai # mysql请使用此配置 - #url: r2dbc:h2:file:///./data/h2db/jetlinks - username: root - password: '!pHuRvGKIsbiqcX1' -easyorm: - auto-ddl: false #是否根据实体类型更新数据库字段(增加、属性) - default-schema: qiuguo_iot # 默认使用的schema. mysql时则为数据库名 - dialect: mysql # 方言: h2,mysql,postgresql -logging: - config: classpath:logback-${spring.profiles.active}.xml - level: - org.hswebframework: debug - org.hswebframework.expands: error - com.qiuguo.iot.data: debug #可以开启sql的日志打印 -hsweb: - cors: - enable: true - configs: - - path: /** - webflux: - response-wrapper: - enabled: true # 将响应结果包装为{"status":200,"result":{}} - excludes: #不包装的类 - - org.springdoc -lac: #lac服务地址 - url: http://127.0.0.1:8866 \ No newline at end of file + name: qiuguo-iot-admin-http-api \ No newline at end of file diff --git a/iot-modules/iot-box-user-api/src/main/resources/bootstrap-dev.yml b/iot-modules/iot-box-user-api/src/main/resources/bootstrap-dev.yml new file mode 100644 index 0000000..8f918c6 --- /dev/null +++ b/iot-modules/iot-box-user-api/src/main/resources/bootstrap-dev.yml @@ -0,0 +1,37 @@ +spring: + cloud: + config: + # 如果本地配置优先级高,那么 override-none 设置为 true,包括系统环境变量、本地配置文件等配置 + override-none: true + # 如果想要远程配置优先级高,那么 allow-override 设置为 false,如果想要本地配置优先级高那么 allow-override 设置为 true + allow-override: true + # 只有系统环境变量或者系统属性才能覆盖远程配置文件的配置,本地配置文件中配置优先级低于远程配置;注意本地配置文件不是系统属性 + override-system-properties: false + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.8.146:32470 + config: + # 配置中心地址 + server-addr: 192.168.8.146:32470 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + r2dbc: + #注意下面修改 easyorm相关也需要修改 + #url: r2dbc:postgresql://localhost:5432/postgres #postgresql请使用此配置 + url: r2dbc:mysql://192.168.8.146:30416/qiuguo_iot?ssl=false&serverZoneId=Asia/Shanghai # mysql请使用此配置 + #url: r2dbc:h2:file:///./data/h2db/jetlinks + username: root + password: 123456 + redis: + # cluster: + # nodes: + # - 127.0.0.1:7001 + # - 127.0.0.1:7002 + host: 192.168.8.146 + port: 32030 + password: 123456 + timeout: 5000 \ No newline at end of file diff --git a/iot-modules/iot-box-user-api/src/main/resources/bootstrap-test.yml b/iot-modules/iot-box-user-api/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..8006c47 --- /dev/null +++ b/iot-modules/iot-box-user-api/src/main/resources/bootstrap-test.yml @@ -0,0 +1,14 @@ +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: iot-nacos.qiuguo-iot:8848 + config: + # 配置中心地址 + server-addr: iot-nacos.qiuguo-iot:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} \ No newline at end of file diff --git a/iot-modules/iot-box-user-api/src/main/resources/bootstrap.yml b/iot-modules/iot-box-user-api/src/main/resources/bootstrap.yml index cd3aa46..cb01af0 100644 --- a/iot-modules/iot-box-user-api/src/main/resources/bootstrap.yml +++ b/iot-modules/iot-box-user-api/src/main/resources/bootstrap.yml @@ -5,17 +5,4 @@ spring: # 环境配置 active: dev application: - name: qiuguo-iot-box-user-api - cloud: - nacos: - discovery: - # 服务注册地址 - server-addr: iot-nacos.qiuguo-iot:8848 - config: - # 配置中心地址 - server-addr: iot-nacos.qiuguo-iot:8848 - # 配置文件格式 - file-extension: yml - # 共享配置 - shared-configs: - - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} \ No newline at end of file + name: qiuguo-iot-box-user-api \ No newline at end of file diff --git a/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-dev.yml b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-dev.yml new file mode 100644 index 0000000..8f918c6 --- /dev/null +++ b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-dev.yml @@ -0,0 +1,37 @@ +spring: + cloud: + config: + # 如果本地配置优先级高,那么 override-none 设置为 true,包括系统环境变量、本地配置文件等配置 + override-none: true + # 如果想要远程配置优先级高,那么 allow-override 设置为 false,如果想要本地配置优先级高那么 allow-override 设置为 true + allow-override: true + # 只有系统环境变量或者系统属性才能覆盖远程配置文件的配置,本地配置文件中配置优先级低于远程配置;注意本地配置文件不是系统属性 + override-system-properties: false + nacos: + discovery: + # 服务注册地址 + server-addr: 192.168.8.146:32470 + config: + # 配置中心地址 + server-addr: 192.168.8.146:32470 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + r2dbc: + #注意下面修改 easyorm相关也需要修改 + #url: r2dbc:postgresql://localhost:5432/postgres #postgresql请使用此配置 + url: r2dbc:mysql://192.168.8.146:30416/qiuguo_iot?ssl=false&serverZoneId=Asia/Shanghai # mysql请使用此配置 + #url: r2dbc:h2:file:///./data/h2db/jetlinks + username: root + password: 123456 + redis: + # cluster: + # nodes: + # - 127.0.0.1:7001 + # - 127.0.0.1:7002 + host: 192.168.8.146 + port: 32030 + password: 123456 + timeout: 5000 \ No newline at end of file diff --git a/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-test.yml b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..8006c47 --- /dev/null +++ b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap-test.yml @@ -0,0 +1,14 @@ +spring: + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: iot-nacos.qiuguo-iot:8848 + config: + # 配置中心地址 + server-addr: iot-nacos.qiuguo-iot:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} \ No newline at end of file diff --git a/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml index 78ef332..62e4975 100644 --- a/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml +++ b/iot-modules/iot-box-websocket-api/src/main/resources/bootstrap.yml @@ -5,17 +5,4 @@ spring: # 环境配置 active: dev application: - name: qiuguo-iot-box-websocket - cloud: - nacos: - discovery: - # 服务注册地址 - server-addr: iot-nacos.qiuguo-iot:8848 - config: - # 配置中心地址 - server-addr: iot-nacos.qiuguo-iot:8848 - # 配置文件格式 - file-extension: yml - # 共享配置 - shared-configs: - - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + name: qiuguo-iot-box-websocket \ No newline at end of file diff --git a/logs/iot-box-websocket-api/error.log b/logs/iot-box-websocket-api/error.log index bebb461..af49b2c 100644 --- a/logs/iot-box-websocket-api/error.log +++ b/logs/iot-box-websocket-api/error.log @@ -2712,3 +2712,7 @@ java.net.ConnectException: no available server, currentServerAddr : http://192.1 18:57:22.363 [Thread-1] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,108] []- [HttpClientBeanHolder] Start destroying common HttpClient 18:57:22.363 [Thread-13] WARN c.a.n.c.n.NotifyCenter - [shutdown,162] []- [NotifyCenter] Destruction of the end 18:57:22.364 [Thread-1] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,114] []- [HttpClientBeanHolder] Destruction of the end +20:48:26.353 [background-preinit] INFO o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final +20:48:28.485 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket] & group[DEFAULT_GROUP] +20:48:28.489 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket.yml] & group[DEFAULT_GROUP] +20:48:28.499 [main] INFO o.s.c.b.c.PropertySourceBootstrapConfiguration - [doInitialize,134] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket-dev.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-application-dev.yml,DEFAULT_GROUP'}] diff --git a/logs/iot-box-websocket-api/info.log b/logs/iot-box-websocket-api/info.log index bebb461..af49b2c 100644 --- a/logs/iot-box-websocket-api/info.log +++ b/logs/iot-box-websocket-api/info.log @@ -2712,3 +2712,7 @@ java.net.ConnectException: no available server, currentServerAddr : http://192.1 18:57:22.363 [Thread-1] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,108] []- [HttpClientBeanHolder] Start destroying common HttpClient 18:57:22.363 [Thread-13] WARN c.a.n.c.n.NotifyCenter - [shutdown,162] []- [NotifyCenter] Destruction of the end 18:57:22.364 [Thread-1] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,114] []- [HttpClientBeanHolder] Destruction of the end +20:48:26.353 [background-preinit] INFO o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final +20:48:28.485 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket] & group[DEFAULT_GROUP] +20:48:28.489 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket.yml] & group[DEFAULT_GROUP] +20:48:28.499 [main] INFO o.s.c.b.c.PropertySourceBootstrapConfiguration - [doInitialize,134] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket-dev.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-application-dev.yml,DEFAULT_GROUP'}] diff --git a/logs/iot-box-websocket-api/warn.log b/logs/iot-box-websocket-api/warn.log index bebb461..af49b2c 100644 --- a/logs/iot-box-websocket-api/warn.log +++ b/logs/iot-box-websocket-api/warn.log @@ -2712,3 +2712,7 @@ java.net.ConnectException: no available server, currentServerAddr : http://192.1 18:57:22.363 [Thread-1] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,108] []- [HttpClientBeanHolder] Start destroying common HttpClient 18:57:22.363 [Thread-13] WARN c.a.n.c.n.NotifyCenter - [shutdown,162] []- [NotifyCenter] Destruction of the end 18:57:22.364 [Thread-1] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,114] []- [HttpClientBeanHolder] Destruction of the end +20:48:26.353 [background-preinit] INFO o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final +20:48:28.485 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket] & group[DEFAULT_GROUP] +20:48:28.489 [main] WARN c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,87] - Ignore the empty nacos configuration and get it based on dataId[qiuguo-iot-box-websocket.yml] & group[DEFAULT_GROUP] +20:48:28.499 [main] INFO o.s.c.b.c.PropertySourceBootstrapConfiguration - [doInitialize,134] - Located property source: [BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket-dev.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket.yml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-qiuguo-iot-box-websocket,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-application-dev.yml,DEFAULT_GROUP'}]