UP | HOME

applicationContext-DataSource.xml

<?xml version="1.0" encoding="UTF-8"?>
   <!-- DATASOURCE DEFINITON-->
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
   <bean id="dataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource">
      <property name="driverClassName" value="com.mysql.jdbc.Driver" />
      <property name="url" value="jdbc:mysql://localhost/test" />
      <property name="username" value="root" />
      <property name="password" value="" />
   </bean>
   <!-- HIBERNATE CONFIGURATION -->
   <bean id="sessionFactory"
      class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
      <property name="hibernateProperties">
         <props>
            <prop key="hibernate.dialect">
               org.hibernate.dialect.MySQLInnoDBDialect
            </prop>
            <prop key="hibernate.show_sql">true</prop>
            <prop key="hibernate.hbm2ddl.auto">create</prop>
         </props>
      </property>
      <property name="dataSource" ref="dataSource" />

      <property name="annotatedClasses">
         <list>
            <value>de.botzenhart.testjsf.security.model.User</value>
         </list>
      </property>
   </bean>

</beans>

Author: Rainer Schuler

Date: 2011-02-11 Fr

HTML generated by org-mode 7.4 in emacs 22