## TDengine SpringBoot + Mybatis Demo
### 配置 application.properties
```properties
# datasource config - JDBC-RESTful
spring.datasource.driver-class-name=com.taosdata.jdbc.rs.RestfulDriver
spring.datasource.url=jdbc:TAOS-RS://你的IP地址:6041/demo?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
spring.datasource.username=root
spring.datasource.password=taosdata
spring.datasource.druid.initial-size=5
spring.datasource.druid.min-idle=5
spring.datasource.druid.max-active=5
spring.datasource.druid.max-wait=30000
spring.datasource.druid.validation-query=select server_status();
#mybatis
#mybatis.mapper-locations=classpath:mapper/*.xml
logging.level.com.taosdata.example.springbootdemo.dao=debug
server.port=8081
```
### 主要功能
* 创建数据库和表
```xml
create database if not exists test;
create table if not exists test.weather(ts timestamp, temperature int, humidity float);
```
* 插入单条记录
```xml
insert into test.weather (ts, temperature, humidity) values (now, #{temperature,jdbcType=INTEGER}, #{humidity,jdbcType=FLOAT})
```
* 插入多条记录
```xml
insert into test.weather (ts, temperature, humidity) values
(now + #{index}a, #{weather.temperature}, #{weather.humidity})
```
* 分页查询
```xml
ts, temperature, humidity
```