38 lines
1.7 KiB
XML
38 lines
1.7 KiB
XML
<?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:jdbc="http://www.springframework.org/schema/jdbc"
|
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
|
|
|
|
<jdbc:embedded-database id="dataSource" type="H2">
|
|
<jdbc:script location="classpath:init_schema.sql" />
|
|
<jdbc:script location="classpath:init_data.sql" />
|
|
</jdbc:embedded-database>
|
|
|
|
<bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
|
|
<property name="packagesToScan" value="de.ctdo.bunti.model"/>
|
|
<property name="hibernateProperties">
|
|
<props>
|
|
<prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
|
|
<prop key="hibernate.show_sql">true</prop>
|
|
<!--<prop key="hibernate.hbm2ddl.auto">create</prop>-->
|
|
</props>
|
|
</property>
|
|
<property name="dataSource" ref="dataSource" />
|
|
</bean>
|
|
|
|
|
|
<bean id="roomsDAO" class="de.ctdo.bunti.dao.RoomsDAOImpl">
|
|
<property name="sessionFactory" ref="hibernateSessionFactory" />
|
|
</bean>
|
|
|
|
|
|
<tx:annotation-driven />
|
|
|
|
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
|
|
<property name="sessionFactory" ref="hibernateSessionFactory"/>
|
|
</bean>
|
|
|
|
|
|
|
|
</beans> |