public class ApplicationPostProcessor extends Object implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered
BeanFactoryPostProcessor
that configures the datasource
bean which is of type
DataSource
, but only if the Application
requires a database.Constructor and Description |
---|
ApplicationPostProcessor(DatabaseConnection databaseConnection,
Collection<String> dictionaryNames)
Creates a new
ApplicationPostProcessor using the given DatabaseConnection . |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
If this
ApplicationPostProcessor was created with a non-null DatabaseConnection , a
DatasourceConfigurer is configured using that DatabaseConnection . |
public ApplicationPostProcessor(DatabaseConnection databaseConnection, Collection<String> dictionaryNames)
ApplicationPostProcessor
using the given DatabaseConnection
.databaseConnection
- a DatabaseConnection
, may be null
.dictionaryNames
- the name of the dictionary files that the Application
uses (see
AbstractResourceBasedMessageSource.setBasenames(String...)
)public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
ApplicationPostProcessor
was created with a non-null
DatabaseConnection
, a
DatasourceConfigurer
is configured using that DatabaseConnection
. Otherwise, the
datasource
bean gets destroyed.postProcessBeanFactory
in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
org.springframework.beans.BeansException
DatasourceConfigurer
public int getOrder()
getOrder
in interface org.springframework.core.Ordered
Copyright © 2011–2017 aiticon GmbH. All rights reserved.