TDengine linux部署连接驱动问题:
java.lang.UnsatisfiedLinkError: no taos in java.library.path
解决方案有有两种:
方法一:
使用原生的连接需要安装客户端,docker应用的话需要安装tdengine客户端到相应应用容器里面:windows端的需要安装tdengine客户端
注意使用driver 驱动不同:
tdengine-server:
url: jdbc:TAOS://IP:6030/dbname?user=root&password=124564897
username: root
password: 123456789
driver-class-name: com.taosdata.jdbc.TSDBDriver
minimum-idle: 5
idle-timeout: 180000
maximum-pool-size: 10
auto-commit: true
max-lifetime: 1800000
connection-timeout: 30000
connection-test-query: show tables
该方法集群的时候找节点会遇到些问题;
方法二:
使用rest/websocker 连接不需要安装客户端
tdengine-server:
url: jdbc:TAOS-RS://${TDENGINE_HOST:IP}:${TDENGINE_PORT:6041}/${TDENGINE_DBNAME:DB}?timezone=UTC-8&charset=utf-8&serverTimezone=Asia/Shanghai
username: ${TDENGINE_USERNAME:root}
password: ${TDENGINE_PWD:pwd123}
driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
minimum-idle: 5
idle-timeout: 180000
maximum-pool-size: 10
auto-commit: true
max-lifetime: 1800000
connection-timeout: 30000
connection-test-query: show tables