Advertisement
Guest User

Untitled

a guest
Jul 16th, 2015
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.93 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans default-autowire="byName"
  3.       xmlns="http://www.springframework.org/schema/beans"
  4.       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.       xmlns:context="http://www.springframework.org/schema/context"
  6.       xmlns:tx="http://www.springframework.org/schema/tx"
  7.       xmlns:p="http://www.springframework.org/schema/p"
  8.       xmlns:util="http://www.springframework.org/schema/util"
  9.       xmlns:jee="http://www.springframework.org/schema/jee"
  10.       xsi:schemaLocation="http://www.springframework.org/schema/beans
  11.           http://www.springframework.org/schema/beans/spring-beans.xsd
  12.           http://www.springframework.org/schema/context
  13.           http://www.springframework.org/schema/context/spring-context.xsd
  14.            http://www.springframework.org/schema/tx
  15.           http://www.springframework.org/schema/tx/spring-tx.xsd
  16.           http://www.springframework.org/schema/util
  17.           http://www.springframework.org/schema/util/spring-util.xsd
  18.           http://www.springframework.org/schema/jee
  19.           http://www.springframework.org/schema/jee/spring-jee.xsd">
  20.  
  21.     <bean id="transactionManager"
  22.         class="org.springframework.orm.hibernate4.HibernateTransactionManager">
  23.         <property name="sessionFactory" ref="sessionFactory" />
  24.     </bean>
  25.  
  26.     <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
  27.         <property name="jndiName" value="java:comp/env/softlog/autopark/DataSource" />
  28.     </bean>
  29.  
  30.     <bean id="sessionFactory"
  31.         class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
  32.         <property name="dataSource" ref="dataSource" />
  33.         <property name="configLocation" value="classpath:/hibernate.cfg.xml" />
  34.         <property name="hibernateProperties">
  35.             <util:map>
  36.                 <entry key="hibernate.hbm2ddl.auto" value="update" />
  37.                 <entry key="hibernate.show_sql" value="false" />
  38.                 <entry key="hibernate.dialect">
  39.                     <jee:jndi-lookup jndi-name="java:comp/env/softlog/autopark/HibernateDialect" />
  40.                 </entry>
  41.             </util:map>
  42.         </property>
  43.     </bean>
  44.  
  45.     <tx:annotation-driven transaction-manager="transactionManager" />
  46.  
  47.     <context:annotation-config />
  48.     <context:component-scan base-package="org.softlog.autopark" />
  49.  
  50.     <!--Beans -->
  51.     <bean id="deviceDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  52.        p:model="org.softlog.autopark.model.Device" />
  53.     <bean id="deviceTypeDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  54.        p:model="org.softlog.autopark.model.DeviceType" />
  55.     <bean id="carDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  56.        p:model="org.softlog.autopark.model.Car" />
  57.     <bean id="carTypeDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  58.        p:model="org.softlog.autopark.model.CarType" />
  59.     <bean id="carFuelDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  60.        p:model="org.softlog.autopark.model.CarFuel" />
  61.     <bean id="carStateDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  62.        p:model="org.softlog.autopark.model.CarState" />
  63.     <bean id="driverDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  64.        p:model="org.softlog.autopark.model.Driver" />
  65.     <bean id="driverCategoryDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  66.        p:model="org.softlog.autopark.model.DriverCategory" />
  67.     <bean id="placeDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  68.        p:model="org.softlog.autopark.model.Place" />
  69.     <bean id="routeDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  70.        p:model="org.softlog.autopark.model.Route" />
  71.     <bean id="zoneDao" class="org.softlog.autopark.dao.hibernate.HibernateDao"
  72.        p:model="org.softlog.autopark.model.Zone" />
  73.     <bean id="raceDao" class="org.softlog.autopark.dao.hibernate.RaceDaoImpl"
  74.        p:model="org.softlog.autopark.model.Race" />
  75.     <bean id="pointDao" class="org.softlog.autopark.dao.hibernate.PointDaoImpl"
  76.        p:model="org.softlog.autopark.model.Point" />
  77. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement