获取数据源连接配置优化
druid版本升级到1.2.16 已知问题修复
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -138,7 +138,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.2.14</version>
|
||||
<version>1.2.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.freemarker</groupId>
|
||||
|
||||
@@ -24,8 +24,8 @@ public class DruidDataSourceUtil {
|
||||
dataSource.setUrl(url);
|
||||
dataSource.setUsername(username);
|
||||
dataSource.setPassword(password);
|
||||
dataSource.setInitialSize(2);
|
||||
dataSource.setMinIdle(2);
|
||||
dataSource.setInitialSize(1);
|
||||
dataSource.setMinIdle(1);
|
||||
dataSource.setMaxActive(50);
|
||||
dataSource.setTestWhileIdle(true);
|
||||
dataSource.setTestOnBorrow(false);
|
||||
|
||||
@@ -45,12 +45,7 @@ public class DatasourceUtil {
|
||||
}
|
||||
Resource[] resources = analysisApi.process(dbUrl, databaseFactoryBean);
|
||||
// 数据源配置
|
||||
DruidDataSource dataSource = DruidDataSourceUtil.createDataSource(dbDatasource.getDriverClassName(), dbDatasource.getSourceUrl(), dbDatasource.getSourceName(), dbDatasource.getSourcePassword(), false);
|
||||
if (breakAfterAcquireFailure) {
|
||||
dataSource.close();
|
||||
// 先关闭会自动关闭的数据源,再创建一个会重连的
|
||||
dataSource = DruidDataSourceUtil.createDataSource(dbDatasource.getDriverClassName(), dbDatasource.getSourceUrl(), dbDatasource.getSourceName(), dbDatasource.getSourcePassword(), true);
|
||||
}
|
||||
DruidDataSource dataSource = DruidDataSourceUtil.createDataSource(dbDatasource.getDriverClassName(), dbDatasource.getSourceUrl(), dbDatasource.getSourceName(), dbDatasource.getSourcePassword(), breakAfterAcquireFailure);
|
||||
// 创建sqlSessionTemplate
|
||||
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
|
||||
sqlSessionFactoryBean.setDataSource(dataSource);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.zyplayer.doc.db.framework.db.mapper.base;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zyplayer.doc.db.service.database;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.zyplayer.doc.db.controller.param.DataViewParam;
|
||||
import com.zyplayer.doc.db.controller.vo.TableDdlVo;
|
||||
import com.zyplayer.doc.db.framework.db.dto.ColumnInfoDto;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon-db.png"><title>数据库文档管理</title><link href="css/chunk-vendors.140b583e.css" rel="preload" as="style"><link href="css/index.b81f44bc.css" rel="preload" as="style"><link href="js/chunk-vendors.31333e1f.js" rel="preload" as="script"><link href="js/index.58fb8d7f.js" rel="preload" as="script"><link href="css/chunk-vendors.140b583e.css" rel="stylesheet"><link href="css/index.b81f44bc.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zyplayer-db-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.31333e1f.js"></script><script src="js/index.58fb8d7f.js"></script></body></html>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon-db.png"><title>数据库文档管理</title><link href="css/chunk-vendors.140b583e.css" rel="preload" as="style"><link href="css/index.f70064b1.css" rel="preload" as="style"><link href="js/chunk-vendors.31333e1f.js" rel="preload" as="script"><link href="js/index.5955c78a.js" rel="preload" as="script"><link href="css/chunk-vendors.140b583e.css" rel="stylesheet"><link href="css/index.f70064b1.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but zyplayer-db-ui doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.31333e1f.js"></script><script src="js/index.5955c78a.js"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
1
zyplayer-doc-db/src/main/resources/dist/js/index.5955c78a.js
vendored
Normal file
1
zyplayer-doc-db/src/main/resources/dist/js/index.5955c78a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -415,8 +415,6 @@ export default {
|
||||
//动态设置表格高度,尽量避免出现滚动条
|
||||
if(result.selectCount){
|
||||
this.height = 235;
|
||||
}else{
|
||||
this.height = 270;
|
||||
}
|
||||
});
|
||||
//多个结果情况下,且点击分页
|
||||
|
||||
Reference in New Issue
Block a user