@Configuration @EnableTransactionManagement public class EntityManagerConfig extends Object
| Constructor and Description |
|---|
EntityManagerConfig() |
| Modifier and Type | Method and Description |
|---|---|
DataSource |
dataSource() |
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean |
entityManagerFactory(DataSource dataSource,
org.springframework.core.env.Environment environment) |
org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor |
exceptionTranslation() |
org.springframework.transaction.PlatformTransactionManager |
transactionManager(javax.persistence.EntityManagerFactory emf) |
@Bean public DataSource dataSource()
@Bean public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource, org.springframework.core.env.Environment environment)
@Bean(name="transactionManager") public org.springframework.transaction.PlatformTransactionManager transactionManager(javax.persistence.EntityManagerFactory emf)
@Bean public org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor exceptionTranslation()
Copyright © 2016. All rights reserved.