@groovy.transform.CompileStatic class DataSourceBeanDefinitionsPostProcessor extends java.lang.Object implements BeanDefinitionRegistryPostProcessor, PriorityOrdered
Registers the dataSourceConnectionSources and dataSource bean definitions used
when no GORM datastore plugin supplies a dataSource, replacing the registration the
data-source plugin previously performed through the doWithSpring() bean DSL. The
dataSource bean is an InstanceFactoryBean whose produced type — javax.sql.DataSource
— is only known from an explicit constructor argument, which an instance supplier would hide from
Spring's factory-bean type prediction and thereby break by-type autowiring of DataSource.
The definitions are therefore contributed here, mirroring the original DSL (including the SpEL
expression that pulls the source from the resolved connection sources).
Runs as a PriorityOrdered post-processor with highest precedence so the definitions
are registered before Spring Boot's configuration-class post-processor evaluates auto-configuration
conditions — the same visibility the doWithSpring() registration had.
| Constructor and description |
|---|
DataSourceBeanDefinitionsPostProcessor(PropertyResolver configuration) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
int |
getOrder() |
|
void |
postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |