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. Site
and the Application
are also registered as beans.Constructor and Description |
---|
ApplicationPostProcessor(Site site,
Application application,
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(Site site, Application application, DatabaseConnection databaseConnection, Collection<String> dictionaryNames)
ApplicationPostProcessor
using the given DatabaseConnection
.site
- the Site
application
- the Application
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–2019 aiticon GmbH. All rights reserved.