Class SmartfiCoreDatabaseConfiguration

java.lang.Object
es.kukenan.smartfi.microservice.smartficore.config.SmartfiCoreDatabaseConfiguration

@Configuration @EnableTransactionManagement @EnableJpaRepositories(entityManagerFactoryRef="smartfiCoreEntityManagerFactory", transactionManagerRef="smartfiCoreTransactionManager", basePackages="es.kukenan.smartfi.microservice.smartficore.repository") public class SmartfiCoreDatabaseConfiguration extends Object
Smartfi Core Database Configuration.
  • Field Details

    • url

      @Value("${spring.datasource.url}") private String url
      data Source skyline url.
    • dialect

      @Value("${hibernate.dialect}") private String dialect
      hibernate dialect.
    • formatSql

      @Value("${hibernate.format_sql}") private String formatSql
      hibernate format.
  • Constructor Details

    • SmartfiCoreDatabaseConfiguration

      public SmartfiCoreDatabaseConfiguration()
  • Method Details

    • dataSource

      @Bean(name="smartfiCoreDataSource") @ConfigurationProperties(prefix="spring.datasource") public DataSource dataSource()
      coreSky Line Data Source.
      Returns:
      datasource.
    • entityManagerFactory

      @Bean(name="smartfiCoreEntityManagerFactory") public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory(@Qualifier("smartfiCoreDataSource") DataSource dataSource)
      Entity manager.
      Parameters:
      dataSource - core backoffice.
      Returns:
      Local Container Entity Manager Factory.
    • transactionManager

      @Bean(name="smartfiCoreTransactionManager") public org.springframework.transaction.PlatformTransactionManager transactionManager(@Qualifier("smartfiCoreEntityManagerFactory") javax.persistence.EntityManagerFactory entityManagerFactory)
      Entity manager.
      Parameters:
      entityManagerFactory - entity manager factory.
      Returns:
      platform manager.