Advertisement
Guest User

Untitled

a guest
Aug 16th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. -------------------------------------SQLBean.xml---------------------------------------------
  2.  
  3. <?xml version="1.0" encoding="UTF-8"?>
  4. <beans
  5. xmlns="http://www.springframework.org/schema/beans"
  6. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7. xsi:schemaLocation="http://www.springframework.org/schema/beans
  8. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd ">
  9.  
  10. <!-- Initialization for data source -->
  11.  
  12. <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  13. <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  14. <property name="url" value="jdbc:mysql://localhost:3306/testdb"/>
  15. <property name="username" value="root"/>
  16. <property name="password" value=""/>
  17. </bean>
  18.  
  19. <!-- Definition for studentJDBCTemplate bean -->
  20. <bean id="studentJDBCTemplate" class="tutorial.jdbc.StudentJDBCTemplate">
  21. <property name="dataSource" ref="dataSource" />
  22. </bean>
  23.  
  24.  
  25. </beans>
  26.  
  27.  
  28. ---------------------------------------SQLBeanLocal.xml----------------------------------------------
  29.  
  30.  
  31. <?xml version="1.0" encoding="UTF-8"?>
  32. <beans xmlns:batch="http://www.springframework.org/schema/batch"
  33. xmlns="http://www.springframework.org/schema/beans"
  34. xmlns:util="http://www.springframework.org/schema/util"
  35. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  36. xsi:schemaLocation="
  37. http://www.springframework.org/schema/beans
  38. classpath:org/springframework/beans/factory/xml/spring-beans-2.5.xsd
  39. http://www.springframework.org/schema/util
  40. classpath:org/springframework/beans/factory/xml/spring-util-2.5.xsd
  41. http://www.springframework.org/schema/batch
  42. classpath:org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd">
  43. <!-- Initialization for data source -->
  44.  
  45. <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  46. <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
  47. <property name="url" value="jdbc:mysql://localhost:3306/testdb"/>
  48. <property name="username" value="root"/>
  49. <property name="password" value=""/>
  50. </bean>
  51.  
  52. <!-- Definition for studentJDBCTemplate bean -->
  53. <bean id="studentJDBCTemplate" class="tutorial.jdbc.StudentJDBCTemplate">
  54. <property name="dataSource" ref="dataSource" />
  55. </bean>
  56.  
  57.  
  58. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement