Example of @EnableTransactionManagement in Spring
March 21, 2013
In spring , when we are using @Configuration i.e XML free configuration and need to connect to database with hibernate. We need to use @EnableTransactionManagement. This is applied on class level.We need to create bean for HibernateTemplate and sessionFactory and HibernateTransactionManager. Find the example below.
AppConfig.java
AppTest.java
User.java
'Framework & Platform > Spring' 카테고리의 다른 글
spring - ContentNegotiatingViewResolver 확장자로 mediaType 설정 (0) | 2013.06.12 |
---|---|
spring data - mongodb @DBRef (0) | 2013.06.12 |
spring - @MVC에서 favicon.ico 처리 (0) | 2013.06.10 |
spring data - mongodb 도메인 객체에서 사용되는 annotation (0) | 2013.06.06 |
spring data - Spring Data MongoDB Remove _class field (0) | 2013.06.03 |