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:context="http://www.springframework.org/schema/context"
- xmlns:p="http://www.springframework.org/schema/p"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"
- default-autowire="byName">
- <context:property-placeholder location="classpath:test-config.properties" />
- <bean id="dataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource"
- p:driverClassName="${dataSource.driverClassName}" p:url="${dataSource.url}"
- p:username="${dataSource.username}" p:password="${dataSource.password}" />
- <bean id="pum"
- class="org.paloma.switching.bo.CustomPersistenceUnitManager">
- <property name="persistenceXmlLocations">
- <list>
- <value>classpath*:META-INF/persistence-switching.xml</value>
- <value>classpath*:META-INF/wallet-persistence.xml</value>
- </list>
- </property>
- <property name="persistenceUnitPostProcessors">
- <bean class="org.jleaf.core.orm.jpa.MergingPersistenceUnitPostProcessor" />
- </property>
- </bean>
- <bean
- class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
- id="entityManagerFactory" p:dataSource-ref="dataSource">
- <property name="persistenceUnitManager" ref="pum" />
- <property name="jpaVendorAdapter">
- <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
- p:database="POSTGRESQL"
- p:showSql="true"
- p:generateDdl="false" />
- </property>
- <property name="jpaProperties">
- <props>
- <prop key="hibernate.hbm2ddl">validate</prop>
- <prop key="hibernate.connection.driver_class">${dataSource.driverClassName}</prop>
- <prop key="hibernate.connection.username">${dataSource.username}</prop>
- <prop key="hibernate.connection.password">${dataSource.password}</prop>
- <prop key="hibernate.connection.url">${dataSource.url}</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
- <property name="dataSource" ref="dataSource" />
- </bean>
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource" ref="dataSource" />
- </bean>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement