类 SingleDataSourceLookup
- java.lang.Object
- org.springframework.jdbc.datasource.lookup.SingleDataSourceLookup
- 所有已实现的接口:
DataSourceLookup
public class SingleDataSourceLookup extends Object implements DataSourceLookup
An implementation of the DataSourceLookup that simply wraps a single given DataSource, returned for any data source name.- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
构造器概要
构造器 构造器 说明 SingleDataSourceLookup(DataSource dataSource)
Create a new instance of theSingleDataSourceLookup
class.
构造器详细资料
SingleDataSourceLookup
public SingleDataSourceLookup(DataSource dataSource)
Create a new instance of theSingleDataSourceLookup
class.- 参数:
dataSource
- the singleDataSource
to wrap
方法详细资料
getDataSource
public DataSource getDataSource(String dataSourceName)
从接口复制的说明:DataSourceLookup
Retrieve the DataSource identified by the given name.- 指定者:
getDataSource
在接口中DataSourceLookup
- 参数:
dataSourceName
- the name of the DataSource- 返回:
- the DataSource (never
null
)