oracle链接问题

This commit is contained in:
fanghongchao
2018-12-24 14:32:20 +08:00
parent 7791bbf4d4
commit a4b28f718a
5 changed files with 24 additions and 2 deletions
@@ -49,7 +49,8 @@ public class PrimaryDataSourceConfig {
dataSource.setMaxWait(properties.getMaxWait());
dataSource.setTimeBetweenEvictionRunsMillis(properties.getTimeBetweenEvictionRunsMillis());
dataSource.setMinEvictableIdleTimeMillis(properties.getMinEvictableIdleTimeMillis());
dataSource.setValidationQuery(properties.getValidationQuery());
return dataSource;
}
}
@@ -29,6 +29,8 @@ public class PrimaryDsProperties {
private boolean poolPreparedStatements;
private boolean testOnBorrow;
private String validationQuery;
public String getUrl() {
return url;
@@ -133,4 +135,12 @@ public class PrimaryDsProperties {
public void setTestOnBorrow(boolean testOnBorrow) {
this.testOnBorrow = testOnBorrow;
}
public String getValidationQuery() {
return validationQuery;
}
public void setValidationQuery(String validationQuery) {
this.validationQuery = validationQuery;
}
}
@@ -46,6 +46,7 @@ public class SecondaryDataSourceConfig {
dataSource.setMaxWait(properties.getMaxWait());
dataSource.setTimeBetweenEvictionRunsMillis(properties.getTimeBetweenEvictionRunsMillis());
dataSource.setMinEvictableIdleTimeMillis(properties.getMinEvictableIdleTimeMillis());
dataSource.setValidationQuery(properties.getValidationQuery());
return dataSource;
}
@@ -30,6 +30,8 @@ public class SecondaryDsProperties {
private boolean testOnBorrow;
private String validationQuery;
public String getUrl() {
return url;
}
@@ -133,4 +135,12 @@ public class SecondaryDsProperties {
public void setTestOnBorrow(boolean testOnBorrow) {
this.testOnBorrow = testOnBorrow;
}
public String getValidationQuery() {
return validationQuery;
}
public void setValidationQuery(String validationQuery) {
this.validationQuery = validationQuery;
}
}