parent
6978694cb8
commit
2c2c7cee8d
|
@ -39,6 +39,7 @@ import org.springframework.util.StringUtils;
|
||||||
* @author Dave Syer
|
* @author Dave Syer
|
||||||
* @author Maciej Walkowiak
|
* @author Maciej Walkowiak
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
|
* @author Benedikt Ritter
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
@ConfigurationProperties(prefix = DataSourceProperties.PREFIX)
|
@ConfigurationProperties(prefix = DataSourceProperties.PREFIX)
|
||||||
|
@ -161,8 +162,8 @@ public class DataSourceProperties implements BeanClassLoaderAware, EnvironmentAw
|
||||||
|
|
||||||
public String getDriverClassName() {
|
public String getDriverClassName() {
|
||||||
if (StringUtils.hasText(this.driverClassName)) {
|
if (StringUtils.hasText(this.driverClassName)) {
|
||||||
Assert.state(driverClassIsLoadable(),
|
Assert.state(driverClassIsLoadable(), "Cannot load driver class: "
|
||||||
"Cannot load driver class: " + this.driverClassName);
|
+ this.driverClassName);
|
||||||
return this.driverClassName;
|
return this.driverClassName;
|
||||||
}
|
}
|
||||||
String driverClassName = null;
|
String driverClassName = null;
|
||||||
|
@ -187,11 +188,11 @@ public class DataSourceProperties implements BeanClassLoaderAware, EnvironmentAw
|
||||||
ClassUtils.forName(this.driverClassName, null);
|
ClassUtils.forName(this.driverClassName, null);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (UnsupportedClassVersionError ucve) {
|
catch (UnsupportedClassVersionError ex) {
|
||||||
// driver library has been compiled with a later JDK, propagate error
|
// Driver library has been compiled with a later JDK, propagate error
|
||||||
throw ucve;
|
throw ex;
|
||||||
}
|
}
|
||||||
catch (Throwable t) {
|
catch (Throwable ex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue