疯狂的狮子Li
2022-11-07 a63abbf268e4c0a60344f63b5cba828a1347e178
update 优化 hikari 参数顺序 最常用的放上面 删除无用 druid 监控页面
已删除1个文件
已修改3个文件
73 ■■■■■ 文件已修改
ruoyi-admin/src/main/resources/application-dev.yml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-prod.yml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/monitor/druid/index.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-dev.yml
@@ -45,56 +45,56 @@
      datasource:
        # ä¸»åº“数据源
        master:
          type: ${spring.datasource.type}
          driverClassName: com.mysql.cj.jdbc.Driver
          # jdbc æ‰€æœ‰å‚数配置参考 https://lionli.blog.csdn.net/article/details/122018562
          # rewriteBatchedStatements=true æ‰¹å¤„理优化 å¤§å¹…提升批量插入更新删除性能(对数据库有性能损耗 ä½¿ç”¨æ‰¹é‡æ“ä½œåº”考虑性能问题)
          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
          username: root
          password: root
          type: ${spring.datasource.type}
        # ä»Žåº“数据源
        slave:
          lazy: true
          type: ${spring.datasource.type}
          driverClassName: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
          username:
          password:
          type: ${spring.datasource.type}
#        oracle:
#          type: ${spring.datasource.type}
#          driverClassName: oracle.jdbc.OracleDriver
#          url: jdbc:oracle:thin:@//localhost:1521/XE
#          username: ROOT
#          password: root
#          type: ${spring.datasource.type}
#          hikari:
#            connectionTestQuery: SELECT 1 FROM DUAL
#        postgres:
#          type: ${spring.datasource.type}
#          driverClassName: org.postgresql.Driver
#          url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
#          username: root
#          password: root
#          type: ${spring.datasource.type}
#        sqlserver:
#          type: ${spring.datasource.type}
#          driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
#          url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
#          username: SA
#          password: root
#          type: ${spring.datasource.type}
      hikari:
        # æœ€å¤§è¿žæŽ¥æ± æ•°é‡
        maxPoolSize: 20
        # æœ€å°ç©ºé—²çº¿ç¨‹æ•°é‡
        minIdle: 10
        # é…ç½®èŽ·å–è¿žæŽ¥ç­‰å¾…è¶…æ—¶çš„æ—¶é—´
        connection-timeout: 60000
        connectionTimeout: 10000
        # æ ¡éªŒè¶…æ—¶æ—¶é—´
        validationTimeout: 5000
        # ç©ºé—²è¿žæŽ¥å­˜æ´»æœ€å¤§æ—¶é—´ï¼Œé»˜è®¤10分钟
        idle-timeout: 60000
        idleTimeout: 60000
        # æ­¤å±žæ€§æŽ§åˆ¶æ± ä¸­è¿žæŽ¥çš„æœ€é•¿ç”Ÿå‘½å‘¨æœŸï¼Œå€¼0表示无限生命周期,默认30分钟
        max-lifetime: 900000
        # æœ€å¤§è¿žæŽ¥æ± æ•°é‡ï¼Œé»˜è®¤æ˜¯10
        max-pool-size: 20
        # æœ€å°è¿žæŽ¥æ± æ•°é‡
        min-idle: 10
        maxLifetime: 900000
        # è¿žæŽ¥æµ‹è¯•query(配置检测连接是否有效)
        connectionTestQuery: SELECT 1
        # æ­¤å±žæ€§æŽ§åˆ¶ä»Žæ± è¿”回的连接的默认自动提交行为,默认值:true
        isAutoCommit: true
--- # redis å•机配置(单机与集群只能开启一个另一个需要注释掉)
spring:
ruoyi-admin/src/main/resources/application-prod.yml
@@ -48,56 +48,56 @@
      datasource:
        # ä¸»åº“数据源
        master:
          type: ${spring.datasource.type}
          driverClassName: com.mysql.cj.jdbc.Driver
          # jdbc æ‰€æœ‰å‚数配置参考 https://lionli.blog.csdn.net/article/details/122018562
          # rewriteBatchedStatements=true æ‰¹å¤„理优化 å¤§å¹…提升批量插入更新删除性能(对数据库有性能损耗 ä½¿ç”¨æ‰¹é‡æ“ä½œåº”考虑性能问题)
          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
          username: root
          password: root
          type: ${spring.datasource.type}
        # ä»Žåº“数据源
        slave:
          lazy: true
          type: ${spring.datasource.type}
          driverClassName: com.mysql.cj.jdbc.Driver
          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
          username:
          password:
          type: ${spring.datasource.type}
#        oracle:
#          type: ${spring.datasource.type}
#          driverClassName: oracle.jdbc.OracleDriver
#          url: jdbc:oracle:thin:@//localhost:1521/XE
#          username: ROOT
#          password: root
#          type: ${spring.datasource.type}
#          hikari:
#            connectionTestQuery: SELECT 1 FROM DUAL
#        postgres:
#          type: ${spring.datasource.type}
#          driverClassName: org.postgresql.Driver
#          url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
#          username: root
#          password: root
#          type: ${spring.datasource.type}
#        sqlserver:
#          type: ${spring.datasource.type}
#          driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
#          url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
#          username: SA
#          password: root
#          type: ${spring.datasource.type}
      hikari:
        # æœ€å¤§è¿žæŽ¥æ± æ•°é‡
        maxPoolSize: 20
        # æœ€å°ç©ºé—²çº¿ç¨‹æ•°é‡
        minIdle: 10
        # é…ç½®èŽ·å–è¿žæŽ¥ç­‰å¾…è¶…æ—¶çš„æ—¶é—´
        connection-timeout: 60000
        connectionTimeout: 10000
        # æ ¡éªŒè¶…æ—¶æ—¶é—´
        validationTimeout: 5000
        # ç©ºé—²è¿žæŽ¥å­˜æ´»æœ€å¤§æ—¶é—´ï¼Œé»˜è®¤10分钟
        idle-timeout: 60000
        idleTimeout: 60000
        # æ­¤å±žæ€§æŽ§åˆ¶æ± ä¸­è¿žæŽ¥çš„æœ€é•¿ç”Ÿå‘½å‘¨æœŸï¼Œå€¼0表示无限生命周期,默认30分钟
        max-lifetime: 900000
        # æœ€å¤§è¿žæŽ¥æ± æ•°é‡ï¼Œé»˜è®¤æ˜¯10
        max-pool-size: 20
        # æœ€å°è¿žæŽ¥æ± æ•°é‡
        min-idle: 10
        maxLifetime: 900000
        # è¿žæŽ¥æµ‹è¯•query(配置检测连接是否有效)
        connectionTestQuery: SELECT 1
        # æ­¤å±žæ€§æŽ§åˆ¶ä»Žæ± è¿”回的连接的默认自动提交行为,默认值:true
        isAutoCommit: true
--- # redis å•机配置(单机与集群只能开启一个另一个需要注释掉)
spring:
ruoyi-admin/src/main/resources/application.yml
@@ -131,8 +131,6 @@
    - /favicon.ico
    - /*/api-docs
    - /*/api-docs/**
    # druid ç›‘控配置
    - /druid/**
    # actuator ç›‘控配置
    - /actuator
    - /actuator/**
ruoyi-ui/src/views/monitor/druid/index.vue
ÎļþÒÑɾ³ý