org.zodiac.datasource.jdbc.config.druid.DruidMultipleDataSourceInfo Maven / Gradle / Ivy
The newest version!
package org.zodiac.datasource.jdbc.config.druid;
import java.util.List;
import java.util.Map;
import org.zodiac.commons.constants.Constants;
import org.zodiac.datasource.config.AbstractDataSourceConfigInfo;
import org.zodiac.datasource.jdbc.druid.DruidDataSourceWrapper;
import org.zodiac.sdk.toolkit.util.collection.CollUtil;
public class DruidMultipleDataSourceInfo extends AbstractDataSourceConfigInfo {
/*Druid数据源进行KeepAlive是否使用ping,默认关闭,在代理情况可能会出现连接断开的情况。*/
private boolean keepAliveUsePing = Constants.Zodiac.DEFAULT_DATASOURCE_DRUID_KEEP_ALIVE_USE_PING;
/*启sql日志*/
private boolean sqlLog = true;
/*sql日志忽略打印关键字*/
private List sqlLogExcluded = CollUtil.list();
/*数据源连接池,可配置多个数据源*/
private Map pool = CollUtil.map();
private final DruidFilterInfo filter = new DruidFilterInfo();
public DruidMultipleDataSourceInfo() {}
public boolean isKeepAliveUsePing() {
return keepAliveUsePing;
}
public void setKeepAliveUsePing(boolean keepAliveUsePing) {
this.keepAliveUsePing = keepAliveUsePing;
}
public boolean isSqlLog() {
return sqlLog;
}
public void setSqlLog(boolean sqlLog) {
this.sqlLog = sqlLog;
}
public List getSqlLogExcluded() {
return sqlLogExcluded;
}
public void setSqlLogExcluded(List sqlLogExcluded) {
this.sqlLogExcluded = sqlLogExcluded;
}
public Map getPool() {
return pool;
}
public void setPool(Map pool) {
this.pool = pool;
}
public DruidFilterInfo getFilter() {
return filter;
}
}