Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8" ?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc-2.0.xsd">
- <tx:annotation-driven/>
- <!-- Configure how the entityManager is defined -->
- <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="persistenceUnitName" value="BankingWeb" />
- <property name="jpaVendorAdapter">
- <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="generateDdl" value="true" />
- <property name="showSql" value="true" />
- <property name="databasePlatform" value="${hibernate.dialect}" />
- </bean>
- </property>
- </bean>
- <!-- intercepts @PersistenceContext annotation and injects the EntityManager -->
- <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
- <!-- Exception translation bean post processor -->
- <bean id="persistenceException" class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
- </bean>
- <!-- your own DAOs -->
- <bean name="userManager" class="ssel.banking.dao.jpa.UserManager" />
- <bean name="accountManager" class="ssel.banking.dao.jpa.AccountManager" />
- <bean name="userService" class="ssel.banking.service.UserService" />
- <bean name="bankService" class="ssel.banking.service.BankService" />
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement