|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2012-2017 the original author or authors. |
|
|
|
|
* Copyright 2012-2018 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -16,8 +16,6 @@
@@ -16,8 +16,6 @@
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.autoconfigure.jdbc; |
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Field; |
|
|
|
|
|
|
|
|
|
import javax.sql.DataSource; |
|
|
|
|
|
|
|
|
|
import org.apache.tomcat.jdbc.pool.DataSourceProxy; |
|
|
|
|
@ -34,7 +32,6 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
@@ -34,7 +32,6 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext
|
|
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
import org.springframework.context.annotation.EnableMBeanExport; |
|
|
|
|
import org.springframework.util.ReflectionUtils; |
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat; |
|
|
|
|
import static org.junit.Assert.fail; |
|
|
|
|
@ -115,13 +112,6 @@ public class TomcatDataSourceConfigurationTests {
@@ -115,13 +112,6 @@ public class TomcatDataSourceConfigurationTests {
|
|
|
|
|
assertThat(ds.getValidationInterval()).isEqualTo(3000L); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
|
public static <T> T getField(Class<?> target, String name) { |
|
|
|
|
Field field = ReflectionUtils.findField(target, name, null); |
|
|
|
|
ReflectionUtils.makeAccessible(field); |
|
|
|
|
return (T) ReflectionUtils.getField(field, target); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
|
@EnableConfigurationProperties |
|
|
|
|
@EnableMBeanExport |
|
|
|
|
|