public class UnitilsDataSourceFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean
FactoryBean that provides access to the datasource configured in unitils.
For example, you can define a bean in spring named 'dataSource' that connects to the test database as follows:
<bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
| 构造器和说明 |
|---|
UnitilsDataSourceFactoryBean() |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
getObject()
Gets the data source instance.
|
Object |
getObject(String databaseName)
Gets the data source instance.
|
Class<?> |
getObjectType()
Gets the type of the object provided by this
FactoryBean, i.e. |
boolean |
isSingleton() |
public Object getObject(String databaseName) throws Exception
Exceptionpublic Object getObject() throws Exception
getObject 在接口中 org.springframework.beans.factory.FactoryBeanExceptionpublic Class<?> getObjectType()
FactoryBean, i.e. DataSourcegetObjectType 在接口中 org.springframework.beans.factory.FactoryBeanpublic boolean isSingleton()
isSingleton 在接口中 org.springframework.beans.factory.FactoryBeanCopyright © 2008–2020 Matrix. All rights reserved.