Class CommonDataRouteJpaAutoConfiguration
java.lang.Object
com.broadleafcommerce.common.jpa.autoconfigure.CommonDataRouteJpaAutoConfiguration
@Conditional(com.broadleafcommerce.common.jpa.autoconfigure.CommonDataRouteJpaAutoConfiguration.CompositeJpaCondition.class)
@Configuration
@EnableConfigurationProperties({DefaultDataRouteProperties.class,ConnectionProperties.class,EntityManagerValidatorProperties.class})
@AutoConfigureBefore(org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class)
public class CommonDataRouteJpaAutoConfiguration
extends Object
-
Constructor Summary
ConstructorDescriptionCommonDataRouteJpaAutoConfiguration
(org.springframework.boot.autoconfigure.orm.jpa.JpaProperties properties, org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties hibernateProperties, List<org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer> hibernatePropertiesCustomizers, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.jdbc.SchemaManagementProvider> providers, org.springframework.core.env.Environment environment, org.springframework.beans.factory.config.ConfigurableListableBeanFactory factory) -
Method Summary
Modifier and TypeMethodDescriptiondataSource
(List<RoutableDataSource> sources) javax.persistence.EntityManager
entityManager
(javax.persistence.EntityManagerFactory factory) org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
entityManagerFactory
(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder factoryBuilder, List<JpaEntityScanBean> scans, DataSource dataSource) entityManagerValidator
(javax.persistence.EntityManager entityManager, EntityManagerValidatorProperties properties) org.springframework.beans.factory.config.BeanPostProcessor
protected String[]
getPackagesToScan
(List<JpaEntityScanBean> scans) jpaDataRouteReference
(List<JpaEntityScanBean> scans, com.broadleafcommerce.common.extension.data.DataRouteReference reference) mariadbConnectionSchemaInitializer
(ConnectionProperties connectionProperties) mysqlConnectionSchemaInitializer
(ConnectionProperties connectionProperties) oracleConnectionSchemaInitializer
(ConnectionProperties connectionProperties) postgresConnectionSchemaInitializer
(ConnectionProperties connectionProperties) org.springframework.orm.jpa.JpaTransactionManager
transactionManager
(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers> transactionManagerCustomizers, javax.persistence.EntityManagerFactory emf) org.springframework.transaction.support.TransactionTemplate
transactionTemplate
(org.springframework.orm.jpa.JpaTransactionManager transactionManager, org.springframework.core.env.Environment env) yugabytedbConnectionSchemaInitializer
(ConnectionProperties connectionProperties)
-
Constructor Details
-
CommonDataRouteJpaAutoConfiguration
public CommonDataRouteJpaAutoConfiguration(@Nullable org.springframework.boot.autoconfigure.orm.jpa.JpaProperties properties, @Nullable org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties hibernateProperties, List<org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer> hibernatePropertiesCustomizers, org.springframework.beans.factory.ObjectProvider<org.springframework.boot.jdbc.SchemaManagementProvider> providers, org.springframework.core.env.Environment environment, org.springframework.beans.factory.config.ConfigurableListableBeanFactory factory)
-
-
Method Details
-
dataSource
@Primary @Bean @ConditionalOnMissingBean(name="dataSource") public DataSource dataSource(List<RoutableDataSource> sources) -
dataSourceInitializerPostProcessor
@Bean @ConditionalOnMissingBean(name="dataSourceInitializerPostProcessor") public Object dataSourceInitializerPostProcessor() -
entityManagerFactory
@Bean @Primary @ConditionalOnMissingBean(name="entityManagerFactory") public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder factoryBuilder, List<JpaEntityScanBean> scans, @Qualifier("dataSource") DataSource dataSource) -
transactionManager
@Bean @Primary @ConditionalOnMissingBean(name="transactionManager") public org.springframework.orm.jpa.JpaTransactionManager transactionManager(org.springframework.beans.factory.ObjectProvider<org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers> transactionManagerCustomizers, javax.persistence.EntityManagerFactory emf) -
transactionTemplate
@Bean @Primary @ConditionalOnMissingBean(name="transactionTemplate") public org.springframework.transaction.support.TransactionTemplate transactionTemplate(org.springframework.orm.jpa.JpaTransactionManager transactionManager, org.springframework.core.env.Environment env) -
entityManager
@Bean @Primary @ConditionalOnMissingBean(name="entityManager") @Conditional(Spring23Condition.class) public javax.persistence.EntityManager entityManager(javax.persistence.EntityManagerFactory factory) -
entityManagerValidator
@Bean @ConditionalOnMissingBean(name="entityManagerValidator") public EntityManagerValidator entityManagerValidator(javax.persistence.EntityManager entityManager, EntityManagerValidatorProperties properties) -
postgresConnectionSchemaInitializer
@Bean @ConditionalOnMissingBean(name="postgresConnectionSchemaInitializer") public ConnectionSchemaInitializer postgresConnectionSchemaInitializer(ConnectionProperties connectionProperties) -
yugabytedbConnectionSchemaInitializer
@Bean @ConditionalOnMissingBean(name="yugabytedbConnectionSchemaInitializer") public ConnectionSchemaInitializer yugabytedbConnectionSchemaInitializer(ConnectionProperties connectionProperties) -
mariadbConnectionSchemaInitializer
@Bean @ConditionalOnMissingBean(name="mariadbConnectionSchemaInitializer") public ConnectionSchemaInitializer mariadbConnectionSchemaInitializer(ConnectionProperties connectionProperties) -
mysqlConnectionSchemaInitializer
@Bean @ConditionalOnMissingBean(name="mysqlConnectionSchemaInitializer") public ConnectionSchemaInitializer mysqlConnectionSchemaInitializer(ConnectionProperties connectionProperties) -
oracleConnectionSchemaInitializer
@Bean @ConditionalOnMissingBean(name="oracleConnectionSchemaInitializer") public ConnectionSchemaInitializer oracleConnectionSchemaInitializer(ConnectionProperties connectionProperties) -
jpaDataRouteReference
@Bean @ConditionalOnMissingBean public JpaDataRouteReference jpaDataRouteReference(List<JpaEntityScanBean> scans, com.broadleafcommerce.common.extension.data.DataRouteReference reference) -
entityScanningDataRouteReferenceBeanPostProcessor
@Bean @ConditionalOnMissingBean(name="entityScanningDataRouteReferenceBeanPostProcessor") public org.springframework.beans.factory.config.BeanPostProcessor entityScanningDataRouteReferenceBeanPostProcessor(List<JpaEntityScanBean> scans) -
getVendorProperties
-
getPackagesToScan
-