Advertisement
Guest User

xml

a guest
Jul 15th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 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" xmlns:tx="http://www.springframework.org/schema/tx"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans
  5. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  6. http://www.springframework.org/schema/tx
  7. http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  8. ">
  9.  
  10. <tx:annotation-driven transaction-manager="transactionManager"/>
  11.  
  12. <bean id="dataSource"
  13. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  14. <property name="driverClassName" value="com.mysql.jdbc.Driver" />
  15. <property name="url" value="jdbc:mysql://localhost:3306/SpringJDBC" />
  16. <property name="username" value="root" />
  17. <property name="password" value="83F68d52e" />
  18. </bean>
  19.  
  20. <bean id="purchaseProduct" class="com.ja.klasy2.PurchaseProduct">
  21. <property name="dataSource" ref="dataSource" />
  22. </bean>
  23.  
  24. <bean id="transactionManager"
  25. class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  26. <property name="dataSource" ref="dataSource" />
  27. </bean>
  28. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement