From a63abbf268e4c0a60344f63b5cba828a1347e178 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 07 十一月 2022 22:27:21 +0800
Subject: [PATCH] update 优化 hikari 参数顺序 最常用的放上面 删除无用 druid 监控页面
---
/dev/null | 15 -------
ruoyi-admin/src/main/resources/application-prod.yml | 28 +++++++-------
ruoyi-admin/src/main/resources/application.yml | 2 -
ruoyi-admin/src/main/resources/application-dev.yml | 28 +++++++-------
4 files changed, 28 insertions(+), 45 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml
index eb70c58..7b7380b 100644
--- a/ruoyi-admin/src/main/resources/application-dev.yml
+++ b/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:
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index bbd1094..970fe4c 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/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:
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index ee26986..a88ab4a 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -131,8 +131,6 @@
- /favicon.ico
- /*/api-docs
- /*/api-docs/**
- # druid 鐩戞帶閰嶇疆
- - /druid/**
# actuator 鐩戞帶閰嶇疆
- /actuator
- /actuator/**
diff --git a/ruoyi-ui/src/views/monitor/druid/index.vue b/ruoyi-ui/src/views/monitor/druid/index.vue
deleted file mode 100644
index c6ad585..0000000
--- a/ruoyi-ui/src/views/monitor/druid/index.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-<template>
- <i-frame :src="url" />
-</template>
-<script>
-import iFrame from "@/components/iFrame/index";
-export default {
- name: "Druid",
- components: { iFrame },
- data() {
- return {
- url: process.env.VUE_APP_BASE_API + "/druid/login.html"
- };
- },
-};
-</script>
--
Gitblit v1.9.3