java-TDengine springboot

可视化工具地址

https://gitee.com/muxuezhiying/TDengineGUI.git

taos //登录数据库

SELECT * FROM sensor.t1;//查询数据(库.表)

单独集成

		
			com.taosdata.jdbc
			taos-jdbcdriver
			2.0.36
		
		
			com.baomidou
			mybatis-plus-boot-starter
			3.0.6
		
		
			com.alibaba
			druid-spring-boot-starter
			1.1.18
		

spring:
  datasource:
    driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
    url: jdbc:TAOS-RS://xxx:6041/sensor?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
    username: root
    password: taosdata
    druid:
      initial-size: 5
      min-idle: 5
      max-active: 5
      max-wait: 30000
      validation-query: select server_status();

使用:

    

多数据源中

        
            com.baomidou
            dynamic-datasource-spring-boot-starter
            3.5.0
        
spring:
    # 配置数据源信息
    datasource:
        dynamic:
            # 设置默认的数据源或者数据源组,默认值即为master
            primary: master
            # 严格匹配数据源,默认false.true未匹配到指定数据源时抛异常,false使用默认数据源
            strict: false
            datasource:
                master:
                    url: jdbc:mysql://xxx:3306/edgex_server?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                    driver-class-name: com.mysql.cj.jdbc.Driver
                    username: root
                    password: root
                edgexData:
                  driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
                  url: jdbc:TAOS-RS://xxx:6041?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
                  username: root
                  password: taosdata

分页可以直接使用 

PageHelper.startPage(1,1);
@DS("edgexData")
@Mapper
public interface SysEdgexDataMapper {

    List queryList(SysDataCenterVo sysDataCenterVo);
}
    

你可能感兴趣的:(java,java,tdengine)