Advertisement
Guest User

Untitled

a guest
Apr 6th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xmlns:mvc="http://www.springframework.org/schema/mvc"
  6. xmlns:tx="http://www.springframework.org/schema/tx"
  7. xsi:schemaLocation="http://www.springframework.org/schema/beans
  8. http://www.springframework.org/schema/beans/spring-beans.xsd
  9. http://www.springframework.org/schema/context
  10. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  11. http://www.springframework.org/schema/mvc
  12. http://www.springframework.org/schema/mvc/spring-mvc.xsd
  13. http://www.springframework.org/schema/tx
  14. http://www.springframework.org/schema/tx/spring-tx.xsd">
  15.  
  16. <context:component-scan base-package="com.eastertide" />
  17. <mvc:annotation-driven />
  18.  
  19. <bean id="viewResolver"
  20. class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
  21. <property name="prefix" value="/WEB-INF/views/" />
  22. <property name="suffix" value=".jsp" />
  23. </bean>
  24.  
  25. <bean id="sessionFactory"
  26. class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
  27. <property name="packagesToScan" value="com.eastertide.model" />
  28. <property name="dataSource" ref="dataSource" />
  29. </bean>
  30.  
  31. <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  32. <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  33. <property name="url" value="jdbc:mysql://localhost:3306/employee_contact"/>
  34. <property name="username" value="root"/>
  35. <property name="password" value=""/>
  36. </bean>
  37.  
  38. <bean id="employeeDAO" class="com.eastertide.dao.EmployeeDAO" />
  39.  
  40. <tx:annotation-driven transaction-manager="txManager" />
  41. <bean id="txManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
  42. <property name="sessionFactory" ref="sessionFactory"/>
  43. </bean>
  44. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement