@FunctionalInterface public interface DataSourceLookup
Used, for example, to resolve data source names in JPA
persistence.xml
files.
DefaultPersistenceUnitManager.setDataSourceLookup(org.springframework.jdbc.datasource.lookup.DataSourceLookup)
Modifier and Type | Method and Description |
---|---|
DataSource |
getDataSource(String dataSourceName)
Retrieve the DataSource identified by the given name.
|
DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException
dataSourceName
- the name of the DataSourcenull
)DataSourceLookupFailureException
- if the lookup failed