Guest User

Untitled

a guest
Jun 26th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:mvc="http://www.springframework.org/schema/mvc"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans
  7. http://www.springframework.org/schema/beans/spring-beans.xsd
  8. http://www.springframework.org/schema/context
  9. http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
  10.  
  11. <context:component-scan base-package = "mvc"/>
  12. <bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver">
  13. <property name = "prefix" value = "/WEB-INF/pages/" />
  14. <property name = "suffix" value = ".jsp" />
  15. </bean>
  16.  
  17. <bean id = "dataSource" class = "org.springframework.jdbc.datasource.DriverManagerDataSource">
  18. <property name = "driverClassName" value = "oracle.jdbc.driver.OracleDriver" />
  19. <property name = "url" value = "jdbc:oracle:thin:@localhost:1521:XE" />
  20. <property name = "username" value = ""/>
  21. <property name = "password" value = ""/>
  22. </bean>
  23.  
  24. <bean id = "jdbcTemplate" class = "org.springframework.jdbc.core.JdbcTemplate">
  25. <property name = "dataSource" ref = "dataSource"/>
  26. </bean>
  27.  
  28. <bean id = "dao" class = "mvc.dao.DAOImpl">
  29. <property name = "template" ref = "jdbcTemplate"/>
  30. </bean>
  31. </beans>
Add Comment
Please, Sign In to add comment