浏览代码

修改一些配置

dongjh 1 年之前
父节点
当前提交
eafb8bbd3e

+ 0 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/message/websocket/WebSocket.java

@@ -93,8 +93,6 @@ public class WebSocket {
                     log.error(e.getMessage(), e);
                 }
             }
-            // 打包时修改该配置 屏蔽下面的语句
-//            log.info("【系统 WebSocket】群发消息:" + message);
         } catch (Exception e) {
             log.error(e.getMessage(), e);
         }

+ 29 - 28
jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml

@@ -3,12 +3,12 @@ server:
 
   # 打包时修改该配置 放开ssl证书配置 同时将server.jks文件回滚
 #  ssl:
-#      enabled: true
-#    # SSL 证书路径,classpath 必不可少
-#      key-store: classpath:server.jks
-#    # SSL 证书密码
-#      key-store-password: admin123
-#      key-store-type: JKS
+#    enabled: true
+#  # SSL 证书路径,classpath 必不可少
+#    key-store: classpath:server.jks
+#  # SSL 证书密码
+#    key-store-password: admin123
+#    key-store-type: JKS
 
   tomcat:
     max-swallow-size: -1
@@ -56,8 +56,8 @@ spring:
     initialize-schema: embedded
     #定时任务启动开关,true-开  false-关
     auto-startup: true
-    #延迟1秒启动定时任务(改成30秒,为binlog缓存数据留出足够的时间)
-    startup-delay: 30s
+    #延迟1秒启动定时任务(改成60秒,为binlog缓存数据留出足够的时间)
+    startup-delay: 60s
     #用于指定Quartz调度器在添加任务时是否覆盖已经存在的同名任务,此处启动时更新己存在的Job
     overwrite-existing-jobs: true
     properties:
@@ -158,10 +158,13 @@ spring:
       datasource:
         master:
           # 打包时修改该配置
-          url: jdbc:mysql://152.136.206.27:3306/guAn_rl?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-#          url: jdbc:mysql://127.0.0.1:3306/guAn_rl?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
-          username: itdm-boot
-          password: itdm-boot@2023
+#          url: jdbc:mysql://152.136.206.27:3306/guAn_rl?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+#          username: itdm-boot
+#          password: itdm-boot@2023
+
+          url: jdbc:mysql://127.0.0.1:3306/guAn_rl?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+          username: root
+          password: 302201
           driver-class-name: com.mysql.cj.jdbc.Driver
           # 多数据源配置
           #multi-datasource1:
@@ -174,17 +177,13 @@ spring:
     # 数据库索引
     database: 0
     # 打包时修改该配置
+#    host: 119.3.168.55
+#    port: 6380
+#    password: 123qx
 
-    # 地址
-    host: 119.3.168.55
-    # 端口,默认为6379
-    port: 6380
-    # 密码
-    password: 123qx
-
-#    host: 127.0.0.1
-#    port: 6379
-#    password: ''
+    host: 127.0.0.1
+    port: 6379
+    password: ''
 #mybatis plus 设置
 mybatis-plus:
   mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
@@ -265,9 +264,7 @@ jeecg:
     logRetentionDays: 30
   #分布式锁配置
   redisson:
-    # 打包时修改该配置
     address: 152.136.206.27:6379
-#    address: 127.0.0.1:6379
     password:
     type: STANDALONE
     enabled: true
@@ -339,9 +336,13 @@ third-app:
 
 binarylog:
   # 打包时修改该配置
-#   host: 127.0.0.1
-  host: 152.136.206.27
+#  host: 152.136.206.27
+#  username: itdm-boot
+#  password: itdm-boot@2023
+
+  host: 127.0.0.1
+  username: root
+  password: 302201
+
   port: 3306
   schema: guan_rl
-  username: itdm-boot
-  password: itdm-boot@2023

+ 41 - 8
jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml

@@ -1,5 +1,15 @@
 server:
   port: 8866
+
+  # 打包时修改该配置 放开ssl证书配置 同时将server.jks文件回滚
+  ssl:
+    enabled: true
+  # SSL 证书路径,classpath 必不可少
+    key-store: classpath:server.jks
+  # SSL 证书密码
+    key-store-password: admin123
+    key-store-type: JKS
+
   tomcat:
     max-swallow-size: -1
   error:
@@ -37,31 +47,48 @@ spring:
             required: true
   ## quartz定时任务,采用数据库方式
   quartz:
+    # 指定Quartz调度器的数据存储方式:RAM:任务数据存储在内存中,适用于单节点环境,JDBC:任务数据存储在关系型数据库中,适用于多节点环境。
+    #    job-store-type: memory
     job-store-type: jdbc
+    # 指定Quartz调度器在启动时是否需要初始化数据存储库
+    # (embedded:表示Quartz调度器会在启动时使用嵌入式模式初始化数据存储库,即创建必要的表和索引,并将数据存储在内存中)
+    # 如果需要快速、简单地部署Quartz调度器,并且不需要持久化存储数据,则可以选择embedded模式。
     initialize-schema: embedded
     #定时任务启动开关,true-开  false-关
     auto-startup: true
-    #延迟1秒启动定时任务
-    startup-delay: 1s
-    #启动时更新己存在的Job
+    #延迟1秒启动定时任务(改成30秒,为binlog缓存数据留出足够的时间)
+    startup-delay: 30s
+    #用于指定Quartz调度器在添加任务时是否覆盖已经存在的同名任务,此处启动时更新己存在的Job
     overwrite-existing-jobs: true
     properties:
       org:
         quartz:
           scheduler:
+            # 指定Quartz调度器的实例名称
             instanceName: MyScheduler
+            # Quartz调度器会自动为每个实例分配一个唯一的instanceId
             instanceId: AUTO
           jobStore:
+            # 使用内存存储任务数据,适用于轻量级应用。
+            #            class: org.quartz.simpl.RAMJobStore
+            # 使用Spring提供的LocalDataSourceJobStore作为任务存储方式,支持事务管理和集群部署
             class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
             driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+            # 指定Quartz调度器的任务存储方式所使用的数据库表前缀
             tablePrefix: QRTZ_
+            # 指定Quartz调度器是否为集群模式
             isClustered: true
+            # misfireThreshold属性的值表示任务触发器允许的misfire时间,单位为毫秒
             misfireThreshold: 12000
+            # 指定Quartz调度器在集群模式下向数据库更新自身状态的时间间隔
             clusterCheckinInterval: 15000
           threadPool:
             class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
+            # 线程池大小,表示Quartz调度器最多可以同时执行的任务数
+            threadCount: 20
+            # 线程优先级,表示Quartz调度器线程的优先级。
             threadPriority: 5
+            # 是否继承初始化线程的上下文类加载器。
             threadsInheritContextClassLoaderOfInitializingThread: true
   #json 时间戳统一转换
   jackson:
@@ -184,21 +211,20 @@ jeecg:
     #webapp文件路径
     webapp: /opt/jeecg-boot/webapp
   shiro:
-    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo
+    excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**,/api/getUserInfo,/datacoll/webaccess/*,/guan/alarm/list
   #阿里云oss存储和大鱼短信秘钥配置
   oss:
     accessKey: ??
     secretKey: ??
     endpoint: oss-cn-beijing.aliyuncs.com
     bucketName: jeecgdev
-    staticDomain: https://static.jeecg.com
-  # ElasticSearch 设置
+  # ElasticSearch 6设置
   elasticsearch:
     cluster-name: jeecg-ES
     cluster-nodes: 127.0.0.1:9200
     check-enabled: true
   # 在线预览文件服务器地址配置
-  file-view-domain: http://fileview.jeecg.com
+  file-view-domain: 127.0.0.1:8012
   # minio文件上传
   minio:
     minio_url: http://minio.jeecg.com
@@ -296,3 +322,10 @@ third-app:
       # appSecret
       client-secret: ??
       agent-id: ??
+# 与数据库binlog连接参数
+binarylog:
+  host: 127.0.0.1
+  port: 3306
+  schema: guan_rl
+  username: root
+  password: 302201

+ 1 - 0
jeecg-module-system/jeecg-system-start/src/main/resources/logback-spring.xml

@@ -67,6 +67,7 @@
 	<logger name="java.sql.PreparedStatement" level="DEBUG" />
 
 	<!-- 日志输出级别 -->
+	<!-- 打包时修改该配置 将日志级别从INFO改成 ERROR -->
 	<root level="INFO">
 		<appender-ref ref="STDOUT" />
 		<appender-ref ref="FILE" />

+ 1 - 2
module-guan/src/main/java/org/jeecg/modules/MysqlBinLogClient.java

@@ -124,6 +124,7 @@ public class MysqlBinLogClient implements ApplicationRunner {
                 //只要连接的MySQL发生的增删改的操作,则都会进入这里,无论哪个数据库
                 TableMapEventData tableMapEventData = (TableMapEventData) data;
                 if (schema.equals(tableMapEventData.getDatabase())) {
+                    log.error(tableMapEventData.getTableId() + "", tableMapEventData.getTable());
                     if ("guan_ralarm".equals(tableMapEventData.getTable())) {
                         guanralarmid = tableMapEventData.getTableId();
                     } else if ("bwanalogtable".equals(tableMapEventData.getTable())) {
@@ -143,7 +144,6 @@ public class MysqlBinLogClient implements ApplicationRunner {
                 if (guanralarmid == currTableId) {
                     // 打包时修改该配置 屏蔽下面的语句
                     log.info("guan_ralarm Insert");
-//                    log.info("guan_ralarm Insert:" + data.toString());
 
                     WriteRowsEventData writeRowsEventData = (WriteRowsEventData) data;
                     List<GuanRAlarm> alarmList = alarmService.selectAlarm24h(false);
@@ -190,7 +190,6 @@ public class MysqlBinLogClient implements ApplicationRunner {
                 if (guananachglogid == currTableId) {
                     // 打包时修改该配置 屏蔽下面的语句
                     log.info("guan_anachglog Insert");
-//                    log.info("guan_anachglog Insert:" + data.toString());
 
                     Object[] obj = Arrays.stream(((WriteRowsEventData) data).getRows().get(0)).toArray();
                     GuanAnachglog anachglog = new GuanAnachglog();