This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 402594a07 [ISSUE #4940]Add database Connection pool (hikari)
configuration to solve the problem of "No operations allowed after connection
closed". (#4938)
402594a07 is described below
commit 402594a07e71f6965f2df0a9b9e1d8202bf388d8
Author: lianjunwei <[email protected]>
AuthorDate: Tue Aug 1 14:34:13 2023 +0800
[ISSUE #4940]Add database Connection pool (hikari) configuration to solve
the problem of "No operations allowed after connection closed". (#4938)
* apidoc sql
* refact
* commit
* [Task] Shenyu-admin: Fix API document failed to build because of NPE.
* [Task] Shenyu-admin: Fix API document failed to build because of NPE.
* solve conficts,modify LICENSE.
* delete useless code.
* delete useless code.
* commit
* [ISSUE #3843]admin apidoc fix: the required attribute prompt is incorrect
when micro service parameter uses "@ApiModelProperty".
* commit
* [shenyu-examples]add swagger to the example project to test the apidoc
function of the gateway management system.
* commit
* commit
* commit
* [ISSUE #4690]Supports gzip compression in response to HTTP requests.
* [examples]Add Swagger sample project to demonstrate automatic pull
interface documentation.
* delete exapmple
* delete useless code.
* delete useless code.
* Add the data source Connection pool parameter dbcp2 to solve the problem
of "No operations allowed after connection closed".
* code style.
* add hikari config.
* commit
---------
Co-authored-by: lianjunwei <[email protected]>
Co-authored-by: dragon-zhang <[email protected]>
Co-authored-by: xiaoyu <[email protected]>
---
shenyu-admin/src/main/resources/application-h2.yml | 11 ++++++++++-
shenyu-admin/src/main/resources/application-mysql.yml | 12 +++++++++++-
shenyu-admin/src/main/resources/application-og.yml | 10 ++++++++++
shenyu-admin/src/main/resources/application-oracle.yml | 11 +++++++++++
shenyu-admin/src/main/resources/application-pg.yml | 10 ++++++++++
5 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/shenyu-admin/src/main/resources/application-h2.yml
b/shenyu-admin/src/main/resources/application-h2.yml
index 5dd59c487..a41d25e31 100644
--- a/shenyu-admin/src/main/resources/application-h2.yml
+++ b/shenyu-admin/src/main/resources/application-h2.yml
@@ -25,4 +25,13 @@ spring:
username: sa
password: sa
driver-class-name: org.h2.Driver
-
+ hikari:
+ connection-timeout: 30000
+ minimum-idle: 5
+ maximum-pool-size: 20
+ auto-commit: true
+ idle-timeout: 600000
+ max-lifetime: 1800000
+ connection-test-query: SELECT 1
+ connection-init-sql: SET NAMES utf8mb4
+ validation-timeout: 800
diff --git a/shenyu-admin/src/main/resources/application-mysql.yml
b/shenyu-admin/src/main/resources/application-mysql.yml
index e1e8a732a..8c6a8dcf3 100755
--- a/shenyu-admin/src/main/resources/application-mysql.yml
+++ b/shenyu-admin/src/main/resources/application-mysql.yml
@@ -23,4 +23,14 @@ spring:
url:
jdbc:mysql://localhost:3306/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
username: root
password: 12345678
- driver-class-name: com.mysql.cj.jdbc.Driver
\ No newline at end of file
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ hikari:
+ connection-timeout: 30000
+ minimum-idle: 5
+ maximum-pool-size: 20
+ auto-commit: true
+ idle-timeout: 600000
+ max-lifetime: 1800000
+ connection-test-query: SELECT 1
+ connection-init-sql: SET NAMES utf8mb4
+ validation-timeout: 800
diff --git a/shenyu-admin/src/main/resources/application-og.yml
b/shenyu-admin/src/main/resources/application-og.yml
index e68f80522..d9a9635ca 100644
--- a/shenyu-admin/src/main/resources/application-og.yml
+++ b/shenyu-admin/src/main/resources/application-og.yml
@@ -24,6 +24,16 @@ spring:
username: root
password: Shenyu123456
driver-class-name: org.opengauss.Driver
+ hikari:
+ connection-timeout: 30000
+ minimum-idle: 5
+ maximum-pool-size: 20
+ auto-commit: true
+ idle-timeout: 600000
+ max-lifetime: 1800000
+ connection-test-query: SELECT 1
+ connection-init-sql:
+ validation-timeout: 800
mybatis:
type-handlers-package: org.apache.shenyu.admin.mybatis.og.handler
diff --git a/shenyu-admin/src/main/resources/application-oracle.yml
b/shenyu-admin/src/main/resources/application-oracle.yml
index bd2b69e75..1d13a2edc 100644
--- a/shenyu-admin/src/main/resources/application-oracle.yml
+++ b/shenyu-admin/src/main/resources/application-oracle.yml
@@ -24,3 +24,14 @@ spring:
username: root
password: 123456
driver-class-name: oracle.jdbc.OracleDriver
+ hikari:
+ connection-timeout: 30000
+ minimum-idle: 5
+ maximum-pool-size: 20
+ auto-commit: true
+ idle-timeout: 600000
+ max-lifetime: 1800000
+ connection-test-query: SELECT 'x' FROM DUAL
+ connection-init-sql:
+ validation-timeout: 800
+
diff --git a/shenyu-admin/src/main/resources/application-pg.yml
b/shenyu-admin/src/main/resources/application-pg.yml
index 47f18fc36..0783f5d95 100644
--- a/shenyu-admin/src/main/resources/application-pg.yml
+++ b/shenyu-admin/src/main/resources/application-pg.yml
@@ -24,6 +24,16 @@ spring:
username: postgres
password: 123456
driver-class-name: org.postgresql.Driver
+ hikari:
+ connection-timeout: 30000
+ minimum-idle: 5
+ maximum-pool-size: 20
+ auto-commit: true
+ idle-timeout: 600000
+ max-lifetime: 1800000
+ connection-test-query: SELECT 'x'
+ connection-init-sql:
+ validation-timeout: 800
mybatis:
type-handlers-package: org.apache.shenyu.admin.mybatis.pg.handler