1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-06-16 18:30:03 +08:00

https://github.com/cskefu/cskefu/issues/835 fix mysql connection error by upgrading druid

This commit is contained in:
Hai Liang Wang 2023-06-19 16:21:10 +08:00
parent 9962c76abd
commit 0166dc6dc1
3 changed files with 6 additions and 2 deletions

View File

@ -85,6 +85,9 @@ public class Application {
*/
protected static void serve(final String[] args) {
try {
// Tune druid params, https://github.com/cskefu/cskefu/issues/835
System.setProperty("druid.mysql.usePingMethod", "false");
MobileNumberUtils.init();
/************************
* 该APP中加载多个配置文件
@ -96,7 +99,7 @@ public class Application {
app.setBannerMode(Banner.Mode.CONSOLE);
app.setAddCommandLineProperties(false);
app.addListeners(new AppCtxRefreshEventListener());
MainContext.setApplicationContext(app.run(args));
} catch (IOException e) {
logger.error("Application Startup Error", e);

View File

@ -112,6 +112,7 @@ spring.datasource.druid.filters=stat,wall,log4j
# WebStatFilter\u914D\u7F6E\uFF0C\u8BF4\u660E\u8BF7\u53C2\u8003Druid Wiki\uFF0C\u914D\u7F6E_\u914D\u7F6EWebStatFilter
spring.datasource.druid.web-stat-filter.enabled=true
spring.datasource.druid.web-stat-filter.url-pattern=/*
spring.datasource.druid.keep-alive=true
##############################################
# Cache

View File

@ -222,7 +222,7 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.27</version>
<version>1.2.18</version>
</dependency>
<dependency>
<groupId>org.lionsoul</groupId>