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:tx="http://www.springframework.org/schema/tx"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-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/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd">
- <!-- Beans Declaration -->
- <bean id="CalendarOfMaintenance" class="rs.elektrovojvodina.api.domain.CalendarOfMaintenance"/>
- <!-- User Service Declaration -->
- <bean id="CalendarService" class="rs.elektrovojvodina.api.service.CalendarService">
- <property name="calendarDAO" ref="CalendarDAO" />
- </bean>
- <!-- User DAO Declaration -->
- <bean id="CalendarDAO" class="rs.elektrovojvodina.api.dao.CalendarDAO">
- <property name="sessionFactory" ref="SessionFactory" />
- </bean>
- <!-- Data Source Declaration -->
- <bean id="DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
- <property name="driverClass" value="com.mysql.jdbc.Driver" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/elektrovojvodina" />
- <property name="user" value="elektrovojvodina" />
- <property name="password" value="eeo" />
- <property name="maxPoolSize" value="10" />
- <property name="maxStatements" value="0" />
- <property name="minPoolSize" value="5" />
- </bean>
- <!-- Session Factory Declaration -->
- <bean id="SessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
- <property name="dataSource" ref="DataSource" />
- <property name="annotatedClasses">
- <list>
- <value>rs.elektrovojvodina.api.domain.CalendarOfMaintenance</value>
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
- <prop key="hibernate.show_sql">true</prop>
- </props>
- </property>
- </bean>
- <!-- Enable the configuration of transactional behavior based on annotations -->
- <tx:annotation-driven transaction-manager="txManager"/>
- <!-- Transaction Manager is defined -->
- <bean id="txManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
- <property name="sessionFactory" ref="SessionFactory"/>
- </bean>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement