Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------SQLBean.xml---------------------------------------------
- <?xml version="1.0" encoding="UTF-8"?>
- <beans
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd ">
- <!-- Initialization for data source -->
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://localhost:3306/testdb"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- </bean>
- <!-- Definition for studentJDBCTemplate bean -->
- <bean id="studentJDBCTemplate" class="tutorial.jdbc.StudentJDBCTemplate">
- <property name="dataSource" ref="dataSource" />
- </bean>
- </beans>
- ---------------------------------------SQLBeanLocal.xml----------------------------------------------
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns:batch="http://www.springframework.org/schema/batch"
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:util="http://www.springframework.org/schema/util"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- classpath:org/springframework/beans/factory/xml/spring-beans-2.5.xsd
- http://www.springframework.org/schema/util
- classpath:org/springframework/beans/factory/xml/spring-util-2.5.xsd
- http://www.springframework.org/schema/batch
- classpath:org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd">
- <!-- Initialization for data source -->
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://localhost:3306/testdb"/>
- <property name="username" value="root"/>
- <property name="password" value=""/>
- </bean>
- <!-- Definition for studentJDBCTemplate bean -->
- <bean id="studentJDBCTemplate" class="tutorial.jdbc.StudentJDBCTemplate">
- <property name="dataSource" ref="dataSource" />
- </bean>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement