类 DataSourceUnwrapper
- java.lang.Object
- org.springframework.boot.jdbc.DataSourceUnwrapper
public final class DataSourceUnwrapper extends Object
Unwraps aDataSource
that may have been proxied or wrapped in a customWrapper
such asDelegatingDataSource
.- 从以下版本开始:
- 2.0.7
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <T> T
unwrap(DataSource dataSource, Class<T> target)
Return an object that implements the giventarget
type, unwrapping delegate or proxy if necessary.
方法详细资料
unwrap
public static <T> T unwrap(DataSource dataSource, Class<T> target)
Return an object that implements the giventarget
type, unwrapping delegate or proxy if necessary.- 类型参数:
T
- the target type- 参数:
dataSource
- the datasource to handletarget
- the type that the result must implement- 返回:
- an object that implements the target type or
null