applicationContext.xml 1.2 KB
Newer Older
X
xieyinglin 已提交
1 2 3 4 5 6 7
<?xml version="1.0" encoding="utf-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="
	http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans.xsd
8
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"
X
xieyinglin 已提交
9 10 11 12
       default-autowire="byName">

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.taosdata.jdbc.TSDBDriver"></property>
13
        <property name="url" value="jdbc:TAOS://192.168.236.137:6030/"></property>
X
xieyinglin 已提交
14 15 16 17 18
        <property name="username" value="root"></property>
        <property name="password" value="taosdata"></property>
    </bean>


19 20
    <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
        <property name="dataSource" ref="dataSource"></property>
X
xieyinglin 已提交
21 22
    </bean>

23 24
    <context:component-scan base-package="com.taosdata.jdbc.example.jdbcTemplate"/>

X
xieyinglin 已提交
25
</beans>