Package org.jdbi.v3.spring
Class JdbiFactoryBean
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<Jdbi>
org.jdbi.v3.spring.JdbiFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanClassLoaderAware
,org.springframework.beans.factory.BeanFactoryAware
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.FactoryBean<Jdbi>
,org.springframework.beans.factory.InitializingBean
public class JdbiFactoryBean
extends org.springframework.beans.factory.config.AbstractFactoryBean<Jdbi>
Utility class which constructs an
Jdbi
instance which can conveniently
participate in Spring's transaction management system.-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Verifies that a dataSource has been setSeeFactoryBean.getObjectType()
setAutoInstallPlugins
(boolean autoInstallPlugins) Sets whether to install plugins automatically from the classpath, usingServiceLoader
manifests.setDataSource
(DataSource dataSource) The datasource, which should be managed by spring's transaction system, from which theJdbi
will obtain connectionsvoid
setGlobalDefines
(Map<String, Object> defines) setPlugins
(Collection<JdbiPlugin> plugins) Installs the given plugins which will be installed into theJdbi
.Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
destroy, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
JdbiFactoryBean
public JdbiFactoryBean() -
JdbiFactoryBean
-
-
Method Details
-
getObjectType
SeeFactoryBean.getObjectType()
-
setDataSource
The datasource, which should be managed by spring's transaction system, from which theJdbi
will obtain connections- Parameters:
dataSource
- the data source.- Returns:
- this
-
setPlugins
Installs the given plugins which will be installed into theJdbi
.- Parameters:
plugins
- collection of Jdbi plugins to install.- Returns:
- this
-
setAutoInstallPlugins
Sets whether to install plugins automatically from the classpath, usingServiceLoader
manifests.- Parameters:
autoInstallPlugins
- whether to install plugins automatically from the classpath.- Returns:
- this
- See Also:
-
setGlobalDefines
-
afterPropertiesSet
Verifies that a dataSource has been set
-