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:context="http://www.springframework.org/schema/context"
- 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/context
- http://www.springframework.org/schema/context/spring-context-4.2.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">
- <tx:annotation-driven/>
- <context:component-scan base-package="palinfo.com.monProjet.dao"></context:component-scan>
- <context:component-scan base-package="palinfo.com.monProjet.service"></context:component-scan>
- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="url" value="jdbc:mysql://localhost:3307/maBase" />
- <property name="username" value="root" />
- <property name="password" value="" />
- </bean>
- <bean id="hibernateAnnotatedSessionFactory"
- class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="annotatedClasses">
- <list>
- <value>palinfo.com.monProjet.model.Utilisateur</value>
- <value>palinfo.com.monProjet.model.Perso</value>
- <value>palinfo.com.monProjet.model.Mdp</value>
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>
- <prop key="current_session_context_class">thread</prop>
- <prop key="show_sql">false</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
- <property name="sessionFactory" ref="hibernateAnnotatedSessionFactory"></property>
- </bean>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement