Package org.openiam.config
Class DatabaseConfiguration
- java.lang.Object
-
- org.openiam.config.DatabaseConfiguration
-
@Configuration @PropertySources(@PropertySource(ignoreResourceNotFound=true,value={"classpath:openiam.hibernate.properties","file:${confpath}/conf/properties/datasource.properties"},factory=OpeniamPropertySourceFactory.class)) public class DatabaseConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description DatabaseConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSource
dataSource()
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
entityManagerFactory()
Properties
hibernateProperties()
org.springframework.jdbc.core.JdbcTemplate
jdbcTemplate()
org.springframework.orm.jpa.JpaTransactionManager
transactionManager()
org.springframework.transaction.support.TransactionTemplate
transactionTemplate()
-
-
-
Method Detail
-
dataSource
@Primary @Bean(name="dataSource") public DataSource dataSource()
-
jdbcTemplate
@Bean(name="jdbcTemplate") public org.springframework.jdbc.core.JdbcTemplate jdbcTemplate()
-
transactionManager
@Primary @Bean(name="transactionManager") public org.springframework.orm.jpa.JpaTransactionManager transactionManager() throws IOException
- Throws:
IOException
-
transactionTemplate
@Bean(name="transactionTemplate") public org.springframework.transaction.support.TransactionTemplate transactionTemplate() throws IOException
- Throws:
IOException
-
hibernateProperties
@Bean(name="hibernateProperties") public Properties hibernateProperties() throws IOException
- Throws:
IOException
-
entityManagerFactory
@Bean public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory() throws IOException
- Throws:
IOException
-
-