Advertisement
Guest User

Untitled

a guest
Mar 21st, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 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" xmlns:mvc="http://www.springframework.org/schema/mvc"
  5. xsi:schemaLocation="
  6. 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.xsd
  10. http://www.springframework.org/schema/mvc
  11. http://www.springframework.org/schema/mvc/spring-mvc.xsd">
  12.  
  13. <bean id="dataSource"
  14. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  15. <property name="driverClassName" value="org.postgresql.Driver" />
  16. <property name="url" value="jdbc:postgresql://localhost:5432/test" />
  17. <property name="username" value="root" />
  18. <property name="password" value="root" />
  19. </bean>
  20.  
  21. <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
  22. <property name="dataSource" ref="dataSource" />
  23. </bean>
  24.  
  25. </beans>
  26.  
  27. <?xml version="1.0" encoding="UTF-8"?>
  28. <beans xmlns="http://www.springframework.org/schema/beans"
  29. xmlns:context="http://www.springframework.org/schema/context"
  30. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
  31. xsi:schemaLocation="
  32. http://www.springframework.org/schema/beans
  33. http://www.springframework.org/schema/beans/spring-beans.xsd
  34. http://www.springframework.org/schema/context
  35. http://www.springframework.org/schema/context/spring-context.xsd
  36. http://www.springframework.org/schema/mvc
  37. http://www.springframework.org/schema/mvc/spring-mvc.xsd">
  38.  
  39. <bean id="dataSource"
  40. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  41. <property name="driverClassName" value="org.postgresql.Driver" />
  42. <property name="url" value="jdbc:postgresql://localhost:5432/test" />
  43. <property name="username" value="root" />
  44. <property name="password" value="root" />
  45. </bean>
  46.  
  47. <bean id="dataSourceSecond"
  48. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  49. <property name="driverClassName" value="org.postgresql.Driver" />
  50. <property name="url" value="jdbc:postgresql://localhost:5432/test" />
  51. <property name="username" value="root" />
  52. <property name="password" value="root" />
  53. </bean>
  54.  
  55. <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
  56. <property name="dataSource" ref="dataSource" />
  57. </bean>
  58.  
  59. <bean id="jdbcTemplateSecond" class="org.springframework.jdbc.core.JdbcTemplate">
  60. <property name="dataSource" ref="dataSourceSecond" />
  61. </bean>
  62.  
  63. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement