Class JpaEmbeddedDataSourceFactoryBeanRegistrar

java.lang.Object
com.broadleafcommerce.common.jpa.data.entitymanager.JpaEmbeddedDataSourceFactoryBeanRegistrar
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.EnvironmentAware

public class JpaEmbeddedDataSourceFactoryBeanRegistrar extends Object implements org.springframework.context.annotation.ImportBeanDefinitionRegistrar, org.springframework.context.EnvironmentAware
Register a data source for an embedded database. This is generally used during testing and is engaged automatically in tests when the AutoConfigureTestDb annotation is declared. Declaring the spring.test.database.hsql property to true can also be used to drive this behavior. If a datasource with the bean id of JpaDataRoute.routeKey() appended by "DataSource" is present already, then this behavior is automatically skipped.
Author:
Jeff Fischer
  • Constructor Details

    • JpaEmbeddedDataSourceFactoryBeanRegistrar

      public JpaEmbeddedDataSourceFactoryBeanRegistrar()
  • Method Details

    • registerBeanDefinitions

      public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata importingClassMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
      Specified by:
      registerBeanDefinitions in interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware