All Downloads are FREE. Search and download functionalities are using the official Maven repository.

e.genericdao.test-base.1.2.0.source-code.applicationContext-jpa-hibernate.xml Maven / Gradle / Ivy

The newest version!
<?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:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
		http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
		http://www.springframework.org/schema/context
		http://www.springframework.org/schema/context/spring-context-3.2.xsd
		http://www.springframework.org/schema/tx
		http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
		
	<bean id="entityManagerFactory"
		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
		<property name="persistenceUnitName" value="JPATest" />
		<property name="persistenceXmlLocation" value="classpath:persistence.xml" />
		<property name="dataSource" ref="dataSource" />
		<property name="loadTimeWeaver">
			<bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" />
		</property>
		<property name="jpaVendorAdapter" ref="vendorAdapter" />
	</bean>

	<bean id="vendorAdapter"
		class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
		<!-- <property name="databasePlatform" value="${hibernate.dialect}" /> -->
		<property name="database" value="H2" />
		<property name="showSql" value="${show_sql}" />
		<property name="generateDdl" value="true" />
	</bean>

	<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
		<property name="entityManagerFactory" ref="entityManagerFactory" />
	</bean>

	<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
	
	<tx:annotation-driven transaction-manager="transactionManager"/>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy