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:context="http://www.springframework.org/schema/context"
- xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang"
- xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
- 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/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
- http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
- http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"
- default-autowire="byName">
- <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.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager">
- <property name="persistenceXmlLocations">
- <list>
- <value>classpath*:META-INF/persistence.xml</value>
- <value>classpath*:META-INF/inv-persistence.xml</value>
- <value>classpath*:META-INF/inv-custom-persistence.xml</value>
- <value>classpath*:META-INF/sls-persistence.xml</value>
- <value>classpath*:META-INF/sls-custom-persistence.xml</value>
- <value>classpath*:META-INF/master-persistence.xml</value>
- <value>classpath*:META-INF/master-custom-persistence.xml</value>
- <value>classpath*:META-INF/jms-persistence.xml</value>
- <value>classpath*:META-INF/approval-persistence.xml</value>
- <value>classpath*:META-INF/autonum-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="false" 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>
- <prop key="hibernate.c3p0.min_size">${sls.conn.min_size}</prop>
- <prop key="hibernate.c3p0.max_size">${sls.conn.max_size}</prop>
- <prop key="hibernate.c3p0.timeout">${sls.conn.timeout}</prop>
- <prop key="hibernate.c3p0.max_statements">${sls.conn.max_statements}</prop>
- <prop key="hibernate.c3p0.idle_test_period">${sls.conn.idle_test_period}</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
- <property name="dataSource" ref="dataSource" />
- </bean>
- <!-- JDBC template -->
- <!--
- <bean id="jdbcDataSource"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource"
- p:driverClassName="${dataSource.driverClassName}" p:url="${dataSource.url}"
- p:username="${dataSource.username}" p:password="${dataSource.password}" />
- -->
- <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