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.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
- <context:component-scan base-package="com.aimprosoft.learning"/>
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://localhost:3306/develop?&serverTimezone=UTC&useSSL=false&characterEncoding=utf8"/>
- <property name="username" value="developer"/>
- <property name="password" value="developer"/>
- </bean>
- <bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
- <property name="dataSource" ref="dataSource"/>
- <property name="configLocation" value="classpath:hibernate.cfg.xml"/>
- <property name="packagesToScan" value="com.aimprosoft.learning.database.model"/>
- </bean>
- <bean id="transactionManager"
- class="org.springframework.orm.hibernate5.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
- <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement