46 lines
1.9 KiB
XML
Executable File
46 lines
1.9 KiB
XML
Executable File
<?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: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"
|
|
xmlns:jdbc="http://www.springframework.org/schema/jdbc">
|
|
|
|
<!--<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">-->
|
|
<!--<property name="location">-->
|
|
<!--<value>db.properties</value>-->
|
|
<!--</property>-->
|
|
<!--</bean>-->
|
|
|
|
<jdbc:embedded-database id="dataSource" type="H2">
|
|
<!--<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>
|
|
|
|
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
|
|
|
|
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
|
|
<property name="sessionFactory" ref="hibernateSessionFactory" />
|
|
</bean>
|
|
|
|
|
|
<tx:annotation-driven />
|
|
|
|
|
|
</beans>
|