From e2c84ee5d2efda42577b14a8b990216038b9ce8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=AD=A3=E6=98=8E?= <876670773@qq.com>
Date: Thu, 29 May 2025 17:42:56 +0800
Subject: [PATCH] Update readme.md
---
examples/mybatis-generator/readme.md | 120 ++++++++++++++-------------
1 file changed, 61 insertions(+), 59 deletions(-)
diff --git a/examples/mybatis-generator/readme.md b/examples/mybatis-generator/readme.md
index 4c4e4fe0..7cbdab8a 100644
--- a/examples/mybatis-generator/readme.md
+++ b/examples/mybatis-generator/readme.md
@@ -18,85 +18,87 @@
under the License.
-->
+
# Mybatis-Generator Demo
+
## Introduction
- This demo shows how to use IoTDB-Mybatis-Generator
+This demo shows how to use IoTDB-Mybatis-Generator
### Version usage
- IoTDB: 2.0.2
- mybatis-generator-plugin: 1.3.2
+IoTDB: 2.0.2
+mybatis-generator-plugin: 1.3.2
### 1. Install IoTDB
- please refer to [https://iotdb.apache.org/#/Download](https://iotdb.apache.org/#/Download)
+please refer to [https://iotdb.apache.org/#/Download](https://iotdb.apache.org/#/Download)
### 2. Startup IoTDB
- please refer to [Quick Start](http://iotdb.apache.org/UserGuide/Master/Get%20Started/QuickStart.html)
-
- Then we need to create a database 'test' by cli in table model
- ```
- create database test;
- use test;
- ```
- Then we need to create a database 'table'
- ```
- CREATE TABLE mix3 (
- time TIMESTAMP TIME,
- region STRING TAG,
- plant_id STRING TAG,
- device_id STRING TAG,
- model_id STRING ATTRIBUTE,
- maintenance STRING ATTRIBUTE,
- temperature FLOAT FIELD,
- humidity FLOAT FIELD,
- status Boolean FIELD,
- arrival_time TIMESTAMP FIELD
- ) WITH (TTL=31536000000);
- ```
+please refer to [Quick Start](http://iotdb.apache.org/UserGuide/Master/Get%20Started/QuickStart.html)
+
+Then we need to create a database 'test' by cli in table model
+```
+create database test;
+use test;
+```
+Then we need to create a database 'table'
+```
+CREATE TABLE mix3 (
+ time TIMESTAMP TIME,
+ region STRING TAG,
+ plant_id STRING TAG,
+ device_id STRING TAG,
+ model_id STRING ATTRIBUTE,
+ maintenance STRING ATTRIBUTE,
+ temperature FLOAT FIELD,
+ humidity FLOAT FIELD,
+ status Boolean FIELD,
+ arrival_time TIMESTAMP FIELD
+) WITH (TTL=31536000000);
+```
### 3. Build Dependencies with Maven in your Project
- ```
-
-
-
- org.mybatis.generator
- mybatis-generator-maven-plugin
- 1.4.2
-
-
- org.apache.iotdb
- mybatis-generator-plugin
- 1.3.2
-
-
-
- true
- true
- src/main/resources/generatorConfig.xml
-
-
-
-
- ```
+```
+
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.4.2
+
+
+ org.apache.iotdb
+ mybatis-generator-plugin
+ 1.3.2
+
+
+
+ true
+ true
+ src/main/resources/generatorConfig.xml
+
+
+
+
+```
### 5. put The generatorConfig.xml in your project
- The location of the ` configurationFile ` configuration ` generatorConfig. xml ` file can be found in the ` src/main/resources ` template of this project for reference` Copy its content and place it in the corresponding location
+The location of the ` configurationFile ` configuration ` generatorConfig.xml ` file can be found in the ` src/main/resources ` template of this project for reference` Copy its content and place it in the corresponding location
### 6. exec 'mvn mybatis-generator:generate'
- Execute the command at the location of the 'pom' in the project:` Mvn mybatis generator: generate generates corresponding Java classes and mapper files
+Execute the command at the location of the 'pom' in the project:` Mvn mybatis generator: generate generates corresponding Java classes and mapper files
### 7、the target file location
-
- You can see the target file in your Project
- ```
- org/apache/iotdb/mybatis/plugin/model/Mix.java
- org/apache/iotdb/mybatis/plugin/mapper/MixMapper.java
- org/apache/iotdb/mybatis/plugin/xml/MixMapper.xml
-
- ```
+
+You can see the target file in your Project
+
+```
+org/apache/iotdb/mybatis/plugin/model/Mix.java
+org/apache/iotdb/mybatis/plugin/mapper/MixMapper.java
+org/apache/iotdb/mybatis/plugin/xml/MixMapper.xml
+```