mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
| .. | ||
| src | ||
| .gitignore | ||
| pom.xml | ||
| readme.md | ||
TDEngine Cloud example
Introduction
Use Spring Boot to build a simple web application, and deploy it to connect to TDEngine Cloud.
Usage
- build the project
mvn clean package -Dmaven.test.skip=true
- replace the current url with the database configuration in cloud page
Programming -> Java -> Config, and run the project
java -jar target/example-1.0-SNAPSHOT.jar --spring.datasource.url="jdbc:TAOS-RS://xxxxx"
Check the result
- open the browser and visit the following url
http://localhost:8080/meter/list
- create sub-table
cloud_demoof meters, sub_table name is only allowed to contain letters, numbers, and underscores.
http://localhost:8080/meter/cloud_demo/create
- insert data to sub-table
cloud_demoof meters
http://localhost:8080/meter/cloud_demo/insert
- query last row from sub-table
cloud_demoof meters
http://localhost:8080/meter/cloud_demo/last_row