Class SingleDataSourceLookup
java.lang.Object
org.springframework.jdbc.datasource.lookup.SingleDataSourceLookup
- All Implemented Interfaces:
DataSourceLookup
An implementation of the DataSourceLookup that simply wraps a
single given DataSource, returned for any data source name.
- Since:
- 2.0
- Author:
- Juergen Hoeller
-
Constructor Summary
ConstructorsConstructorDescriptionSingleDataSourceLookup(DataSource dataSource) Create a new instance of theSingleDataSourceLookupclass. -
Method Summary
Modifier and TypeMethodDescriptiongetDataSource(String dataSourceName) Retrieve the DataSource identified by the given name.
-
Constructor Details
-
SingleDataSourceLookup
Create a new instance of theSingleDataSourceLookupclass.- Parameters:
dataSource- the singleDataSourceto wrap
-
-
Method Details
-
getDataSource
Description copied from interface:DataSourceLookupRetrieve the DataSource identified by the given name.- Specified by:
getDataSourcein interfaceDataSourceLookup- Parameters:
dataSourceName- the name of the DataSource- Returns:
- the DataSource (never
null)
-