From 9a7d46049df7386b313f666a2c991b6b2781adea Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 16:22:14 +0800 Subject: [PATCH 1/8] perf: update spring pom add with-springboot profile --- .../src/main/java/org/apache/iotdb/Main.java | 109 ++++--- examples/pom.xml | 10 + iotdb-spring-boot-starter/pom.xml | 20 +- .../iotdb/config/IoTDBSessionProperties.java | 284 +++++++++--------- .../iotdb/session/IoTDBSessionPool.java | 105 +++---- pom.xml | 6 + 6 files changed, 287 insertions(+), 247 deletions(-) diff --git a/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/Main.java b/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/Main.java index b8e19af9..bb98fbdb 100644 --- a/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/Main.java +++ b/examples/mybatisplus-generator/src/main/java/org/apache/iotdb/Main.java @@ -19,62 +19,75 @@ package org.apache.iotdb; +import org.apache.iotdb.jdbc.IoTDBDataSource; + import com.baomidou.mybatisplus.generator.FastAutoGenerator; import com.baomidou.mybatisplus.generator.config.DataSourceConfig; import com.baomidou.mybatisplus.generator.config.OutputFile; import com.baomidou.mybatisplus.generator.config.rules.DateType; import com.baomidou.mybatisplus.generator.config.rules.DbColumnType; -import org.apache.iotdb.jdbc.IoTDBDataSource; import java.sql.Types; import java.util.Collections; - public class Main { - public static void main(String[] args) { - IoTDBDataSource dataSource = new IoTDBDataSource(); - dataSource.setUrl("jdbc:iotdb://127.0.0.1:6667/test?sql_dialect=table"); - dataSource.setUser("root"); - dataSource.setPassword("root"); - FastAutoGenerator generator = FastAutoGenerator.create(new DataSourceConfig.Builder(dataSource).driverClassName("org.apache.iotdb.jdbc.IoTDBDriver")); - generator - .globalConfig(builder -> { - builder.author("IoTDB") - .enableSwagger() - .dateType(DateType.ONLY_DATE) - .outputDir("/apache/iotdb-extras/examples/mybatisplus-generator/src/main/java/"); - }) - .packageConfig(builder -> { - builder.parent("org.apache.iotdb") - .mapper("mapper") - .pathInfo(Collections.singletonMap(OutputFile.xml, "/apache/iotdb-extras/examples/mybatisplus-generator/src/main/java/")); - }) - .dataSourceConfig(builder -> { - builder.typeConvertHandler((globalConfig, typeRegistry, metaInfo) -> { - int typeCode = metaInfo.getJdbcType().TYPE_CODE; - switch (typeCode) { - case Types.FLOAT: - return DbColumnType.FLOAT; - default: - return typeRegistry.getColumnType(metaInfo); - } - }); - }) - .strategyConfig(builder -> { - builder.addInclude("mix"); - builder.entityBuilder() - .enableLombok() - .addIgnoreColumns("create_time") - .enableFileOverride(); - builder.serviceBuilder() - .formatServiceFileName("%sService") - .formatServiceImplFileName("%sServiceImpl") - .convertServiceFileName((entityName -> entityName + "Service")) - .enableFileOverride(); - builder.controllerBuilder() - .enableRestStyle() - .enableFileOverride(); - }) - .execute(); - } + public static void main(String[] args) { + IoTDBDataSource dataSource = new IoTDBDataSource(); + dataSource.setUrl("jdbc:iotdb://127.0.0.1:6667/test?sql_dialect=table"); + dataSource.setUser("root"); + dataSource.setPassword("root"); + FastAutoGenerator generator = + FastAutoGenerator.create( + new DataSourceConfig.Builder(dataSource) + .driverClassName("org.apache.iotdb.jdbc.IoTDBDriver")); + generator + .globalConfig( + builder -> { + builder + .author("IoTDB") + .enableSwagger() + .dateType(DateType.ONLY_DATE) + .outputDir("/apache/iotdb-extras/examples/mybatisplus-generator/src/main/java/"); + }) + .packageConfig( + builder -> { + builder + .parent("org.apache.iotdb") + .mapper("mapper") + .pathInfo( + Collections.singletonMap( + OutputFile.xml, + "/apache/iotdb-extras/examples/mybatisplus-generator/src/main/java/")); + }) + .dataSourceConfig( + builder -> { + builder.typeConvertHandler( + (globalConfig, typeRegistry, metaInfo) -> { + int typeCode = metaInfo.getJdbcType().TYPE_CODE; + switch (typeCode) { + case Types.FLOAT: + return DbColumnType.FLOAT; + default: + return typeRegistry.getColumnType(metaInfo); + } + }); + }) + .strategyConfig( + builder -> { + builder.addInclude("mix"); + builder + .entityBuilder() + .enableLombok() + .addIgnoreColumns("create_time") + .enableFileOverride(); + builder + .serviceBuilder() + .formatServiceFileName("%sService") + .formatServiceImplFileName("%sServiceImpl") + .convertServiceFileName((entityName -> entityName + "Service")) + .enableFileOverride(); + builder.controllerBuilder().enableRestStyle().enableFileOverride(); + }) + .execute(); + } } diff --git a/examples/pom.xml b/examples/pom.xml index f743e7bf..e45a499e 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -38,7 +38,17 @@ rabbitmq rocketmq spark-table + mybatis-generator + mybatisplus-generator + + + with-springboot + + iotdb-spring-boot-start + + + diff --git a/iotdb-spring-boot-starter/pom.xml b/iotdb-spring-boot-starter/pom.xml index 03e831af..1c733aca 100644 --- a/iotdb-spring-boot-starter/pom.xml +++ b/iotdb-spring-boot-starter/pom.xml @@ -22,11 +22,9 @@ 4.0.0 - org.springframework.boot - spring-boot-starter-parent - 3.4.5 - - + org.apache.iotdb + iotdb-extras-parent + 2.0.2-SNAPSHOT org.apache.iotdb iotdb-spring-boot-starter @@ -36,8 +34,18 @@ 17 UTF-8 3.4.5 - 2.0.2 + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot3.version} + pom + import + + + org.apache.iotdb diff --git a/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/config/IoTDBSessionProperties.java b/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/config/IoTDBSessionProperties.java index b61ee8d0..25c22120 100644 --- a/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/config/IoTDBSessionProperties.java +++ b/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/config/IoTDBSessionProperties.java @@ -21,154 +21,154 @@ @ConfigurationProperties(prefix = "iotdb.session") public class IoTDBSessionProperties { - private String url; - private String username; - private String password; - private String database; - private String sql_dialect = "table"; - private Integer max_size = 5; - private Integer fetch_size = 1024; - private long query_timeout_in_ms = 60000L; - private boolean enable_auto_fetch = true; - private boolean use_ssl = false; - private int max_retry_count = 60; - private long wait_to_get_session_timeout_in_msit = 60000L; - private boolean enable_compression = false; - private long retry_interval_in_ms = 500L; - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getDatabase() { - return database; - } - - public void setDatabase(String database) { - this.database = database; - } - - public String getSql_dialect() { - return sql_dialect; - } - - public void setSql_dialect(String sql_dialect) { - this.sql_dialect = sql_dialect; - } - - public Integer getMax_size() { - return max_size; - } - - public void setMax_size(Integer max_size) { - this.max_size = max_size; - } - - public Integer getFetch_size() { - return fetch_size; - } - - public void setFetch_size(Integer fetch_size) { - this.fetch_size = fetch_size; - } - - public Long getQuery_timeout_in_ms() { - return query_timeout_in_ms; - } - - public void setQuery_timeout_in_ms(Long query_timeout_in_ms) { - this.query_timeout_in_ms = query_timeout_in_ms; - } - - public Boolean getEnable_auto_fetch() { - return enable_auto_fetch; - } - - public void setEnable_auto_fetch(Boolean enable_auto_fetch) { - this.enable_auto_fetch = enable_auto_fetch; - } - - public Boolean getUse_ssl() { - return use_ssl; - } - - public void setUse_ssl(Boolean use_ssl) { - this.use_ssl = use_ssl; - } - - public Integer getMax_retry_count() { - return max_retry_count; - } - - public void setMax_retry_count(Integer max_retry_count) { - this.max_retry_count = max_retry_count; - } - - public void setQuery_timeout_in_ms(long query_timeout_in_ms) { - this.query_timeout_in_ms = query_timeout_in_ms; - } - - public boolean isEnable_auto_fetch() { - return enable_auto_fetch; - } - - public void setEnable_auto_fetch(boolean enable_auto_fetch) { - this.enable_auto_fetch = enable_auto_fetch; - } + private String url; + private String username; + private String password; + private String database; + private String sql_dialect = "table"; + private Integer max_size = 5; + private Integer fetch_size = 1024; + private long query_timeout_in_ms = 60000L; + private boolean enable_auto_fetch = true; + private boolean use_ssl = false; + private int max_retry_count = 60; + private long wait_to_get_session_timeout_in_msit = 60000L; + private boolean enable_compression = false; + private long retry_interval_in_ms = 500L; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getDatabase() { + return database; + } + + public void setDatabase(String database) { + this.database = database; + } + + public String getSql_dialect() { + return sql_dialect; + } + + public void setSql_dialect(String sql_dialect) { + this.sql_dialect = sql_dialect; + } + + public Integer getMax_size() { + return max_size; + } + + public void setMax_size(Integer max_size) { + this.max_size = max_size; + } + + public Integer getFetch_size() { + return fetch_size; + } + + public void setFetch_size(Integer fetch_size) { + this.fetch_size = fetch_size; + } + + public Long getQuery_timeout_in_ms() { + return query_timeout_in_ms; + } + + public void setQuery_timeout_in_ms(Long query_timeout_in_ms) { + this.query_timeout_in_ms = query_timeout_in_ms; + } + + public Boolean getEnable_auto_fetch() { + return enable_auto_fetch; + } + + public void setEnable_auto_fetch(Boolean enable_auto_fetch) { + this.enable_auto_fetch = enable_auto_fetch; + } + + public Boolean getUse_ssl() { + return use_ssl; + } + + public void setUse_ssl(Boolean use_ssl) { + this.use_ssl = use_ssl; + } + + public Integer getMax_retry_count() { + return max_retry_count; + } + + public void setMax_retry_count(Integer max_retry_count) { + this.max_retry_count = max_retry_count; + } + + public void setQuery_timeout_in_ms(long query_timeout_in_ms) { + this.query_timeout_in_ms = query_timeout_in_ms; + } + + public boolean isEnable_auto_fetch() { + return enable_auto_fetch; + } + + public void setEnable_auto_fetch(boolean enable_auto_fetch) { + this.enable_auto_fetch = enable_auto_fetch; + } - public boolean isUse_ssl() { - return use_ssl; - } + public boolean isUse_ssl() { + return use_ssl; + } - public void setUse_ssl(boolean use_ssl) { - this.use_ssl = use_ssl; - } + public void setUse_ssl(boolean use_ssl) { + this.use_ssl = use_ssl; + } - public void setMax_retry_count(int max_retry_count) { - this.max_retry_count = max_retry_count; - } + public void setMax_retry_count(int max_retry_count) { + this.max_retry_count = max_retry_count; + } - public long getWait_to_get_session_timeout_in_msit() { - return wait_to_get_session_timeout_in_msit; - } + public long getWait_to_get_session_timeout_in_msit() { + return wait_to_get_session_timeout_in_msit; + } - public void setWait_to_get_session_timeout_in_msit(long wait_to_get_session_timeout_in_msit) { - this.wait_to_get_session_timeout_in_msit = wait_to_get_session_timeout_in_msit; - } + public void setWait_to_get_session_timeout_in_msit(long wait_to_get_session_timeout_in_msit) { + this.wait_to_get_session_timeout_in_msit = wait_to_get_session_timeout_in_msit; + } - public boolean isEnable_compression() { - return enable_compression; - } + public boolean isEnable_compression() { + return enable_compression; + } - public void setEnable_compression(boolean enable_compression) { - this.enable_compression = enable_compression; - } + public void setEnable_compression(boolean enable_compression) { + this.enable_compression = enable_compression; + } - public long getRetry_interval_in_ms() { - return retry_interval_in_ms; - } + public long getRetry_interval_in_ms() { + return retry_interval_in_ms; + } - public void setRetry_interval_in_ms(long retry_interval_in_ms) { - this.retry_interval_in_ms = retry_interval_in_ms; - } -} \ No newline at end of file + public void setRetry_interval_in_ms(long retry_interval_in_ms) { + this.retry_interval_in_ms = retry_interval_in_ms; + } +} diff --git a/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/session/IoTDBSessionPool.java b/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/session/IoTDBSessionPool.java index 8914cdd8..5267c924 100644 --- a/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/session/IoTDBSessionPool.java +++ b/iotdb-spring-boot-starter/src/main/java/org/apache/iotdb/session/IoTDBSessionPool.java @@ -22,6 +22,7 @@ import org.apache.iotdb.isession.pool.ITableSessionPool; import org.apache.iotdb.session.pool.SessionPool; import org.apache.iotdb.session.pool.TableSessionPoolBuilder; + import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -34,62 +35,64 @@ @EnableConfigurationProperties(IoTDBSessionProperties.class) public class IoTDBSessionPool { - private final IoTDBSessionProperties properties; - private ITableSessionPool tableSessionPool; - private ISessionPool treeSessionPool; + private final IoTDBSessionProperties properties; + private ITableSessionPool tableSessionPool; + private ISessionPool treeSessionPool; - public IoTDBSessionPool(IoTDBSessionProperties properties) { - this.properties = properties; - } + public IoTDBSessionPool(IoTDBSessionProperties properties) { + this.properties = properties; + } - @Bean - public ITableSessionPool tableSessionPool() { - if(tableSessionPool == null) { - synchronized (IoTDBSessionPool.class) { - if(tableSessionPool == null) { - tableSessionPool = new TableSessionPoolBuilder(). - nodeUrls(Arrays.asList(properties.getUrl().split(";"))). - user(properties.getUsername()). - password(properties.getPassword()). - database(properties.getDatabase()). - maxSize(properties.getMax_size()). - fetchSize(properties.getFetch_size()). - enableAutoFetch(properties.getEnable_auto_fetch()). - useSSL(properties.getUse_ssl()). - queryTimeoutInMs(properties.getQuery_timeout_in_ms()). - maxRetryCount(properties.getMax_retry_count()). - waitToGetSessionTimeoutInMs(properties.getQuery_timeout_in_ms()). - enableCompression(properties.isEnable_compression()). - retryIntervalInMs(properties.getRetry_interval_in_ms()). - build(); - } - } + @Bean + public ITableSessionPool tableSessionPool() { + if (tableSessionPool == null) { + synchronized (IoTDBSessionPool.class) { + if (tableSessionPool == null) { + tableSessionPool = + new TableSessionPoolBuilder() + .nodeUrls(Arrays.asList(properties.getUrl().split(";"))) + .user(properties.getUsername()) + .password(properties.getPassword()) + .database(properties.getDatabase()) + .maxSize(properties.getMax_size()) + .fetchSize(properties.getFetch_size()) + .enableAutoFetch(properties.getEnable_auto_fetch()) + .useSSL(properties.getUse_ssl()) + .queryTimeoutInMs(properties.getQuery_timeout_in_ms()) + .maxRetryCount(properties.getMax_retry_count()) + .waitToGetSessionTimeoutInMs(properties.getQuery_timeout_in_ms()) + .enableCompression(properties.isEnable_compression()) + .retryIntervalInMs(properties.getRetry_interval_in_ms()) + .build(); } - return tableSessionPool; + } } + return tableSessionPool; + } - @Bean - public ISessionPool treeSessionPool() { - if(treeSessionPool == null) { - synchronized (IoTDBSessionPool.class) { - if(treeSessionPool == null) { - treeSessionPool = new SessionPool.Builder(). - nodeUrls(Arrays.asList(properties.getUrl().split(";"))). - user(properties.getUsername()). - password(properties.getPassword()). - maxSize(properties.getMax_size()). - fetchSize(properties.getFetch_size()). - enableAutoFetch(properties.getEnable_auto_fetch()). - useSSL(properties.getUse_ssl()). - queryTimeoutInMs(properties.getQuery_timeout_in_ms()). - maxRetryCount(properties.getMax_retry_count()). - waitToGetSessionTimeoutInMs(properties.getQuery_timeout_in_ms()). - enableCompression(properties.isEnable_compression()). - retryIntervalInMs(properties.getRetry_interval_in_ms()). - build(); - } - } + @Bean + public ISessionPool treeSessionPool() { + if (treeSessionPool == null) { + synchronized (IoTDBSessionPool.class) { + if (treeSessionPool == null) { + treeSessionPool = + new SessionPool.Builder() + .nodeUrls(Arrays.asList(properties.getUrl().split(";"))) + .user(properties.getUsername()) + .password(properties.getPassword()) + .maxSize(properties.getMax_size()) + .fetchSize(properties.getFetch_size()) + .enableAutoFetch(properties.getEnable_auto_fetch()) + .useSSL(properties.getUse_ssl()) + .queryTimeoutInMs(properties.getQuery_timeout_in_ms()) + .maxRetryCount(properties.getMax_retry_count()) + .waitToGetSessionTimeoutInMs(properties.getQuery_timeout_in_ms()) + .enableCompression(properties.isEnable_compression()) + .retryIntervalInMs(properties.getRetry_interval_in_ms()) + .build(); } - return treeSessionPool; + } } + return treeSessionPool; + } } diff --git a/pom.xml b/pom.xml index ef373b34..34890370 100644 --- a/pom.xml +++ b/pom.xml @@ -2069,6 +2069,12 @@ true + + with-springboot + + iotdb-spring-boot-starter + + apache-release From 669118f0abfecf6e787cc070165e0d5b36adeeec Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 16:40:15 +0800 Subject: [PATCH 2/8] fix build --- examples/mybatis-generator/pom.xml | 7 +------ examples/mybatisplus-generator/pom.xml | 11 ++++++++--- examples/pom.xml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/mybatis-generator/pom.xml b/examples/mybatis-generator/pom.xml index 83e2c72b..f45ada74 100644 --- a/examples/mybatis-generator/pom.xml +++ b/examples/mybatis-generator/pom.xml @@ -29,11 +29,6 @@ mybatis-generator-example 2.0.2-SNAPHOT - - 21 - 21 - UTF-8 - @@ -44,7 +39,7 @@ org.apache.iotdb mybatis-generator-plugin - 1.3.2 + 2.0.2-SNAPSHOT diff --git a/examples/mybatisplus-generator/pom.xml b/examples/mybatisplus-generator/pom.xml index a24d9470..80da7714 100644 --- a/examples/mybatisplus-generator/pom.xml +++ b/examples/mybatisplus-generator/pom.xml @@ -32,11 +32,16 @@ 2.0.2-SNAPHOT 3.5.10 - 21 - 21 + 17 + 17 UTF-8 + + org.mybatis + mybatis + 3.5.19 + com.baomidou mybatis-plus-spring-boot3-starter @@ -55,7 +60,7 @@ org.apache.iotdb iotdb-jdbc - 2.0.1-beta + ${iotdb.version} org.springframework.boot diff --git a/examples/pom.xml b/examples/pom.xml index e45a499e..3c99c7f2 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -39,13 +39,13 @@ rocketmq spark-table mybatis-generator - mybatisplus-generator with-springboot iotdb-spring-boot-start + mybatisplus-generator From 9663795fa7999c3d5b6bdaecdda4ce247f4a6058 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 16:42:18 +0800 Subject: [PATCH 3/8] add jdk17 compile --- .github/workflows/compile-check.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml index 78278280..b78257cd 100644 --- a/.github/workflows/compile-check.yml +++ b/.github/workflows/compile-check.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - java: [8, 11, 17] + java: [8, 11] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} steps: @@ -48,3 +48,21 @@ jobs: shell: bash run: | mvn clean verify -P with-integration-tests -ntp + compile-check-jdk17-and-above: + strategy: + fail-fast: false + matrix: + java: [17, 21] + os: [ ubuntu-latest ] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v4 + with: + distribution: liberica + java-version: ${{ matrix.java }} + - name: Compiler Test + shell: bash + run: | + mvn clean verify -P with-integration-tests -P with-springboot -ntp From e102da7e7ec96947647f93041b3b129069ee5d8c Mon Sep 17 00:00:00 2001 From: Haonan Date: Sun, 27 Apr 2025 17:01:16 +0800 Subject: [PATCH 4/8] Update compile-check.yml --- .github/workflows/compile-check.yml | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml index b78257cd..60b506eb 100644 --- a/.github/workflows/compile-check.yml +++ b/.github/workflows/compile-check.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - java: [8, 11] + java: [8, 11, 17, 21] os: [ ubuntu-latest ] runs-on: ${{ matrix.os }} steps: @@ -47,22 +47,8 @@ jobs: - name: Compiler Test shell: bash run: | - mvn clean verify -P with-integration-tests -ntp - compile-check-jdk17-and-above: - strategy: - fail-fast: false - matrix: - java: [17, 21] - os: [ ubuntu-latest ] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 - with: - distribution: liberica - java-version: ${{ matrix.java }} - - name: Compiler Test - shell: bash - run: | - mvn clean verify -P with-integration-tests -P with-springboot -ntp + if [ "${{ matrix.java }}" -ge 17 ]; then + mvn clean verify -P with-integration-tests -P with-springboot -ntp + else + mvn clean verify -P with-integration-tests -ntp + fi From 3c6551ca73403fe4770a31e589aca744640d8497 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 17:12:00 +0800 Subject: [PATCH 5/8] fix jdk17 compile --- .github/workflows/compile-check.yml | 4 ++-- iotdb-spring-boot-starter/pom.xml | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile-check.yml b/.github/workflows/compile-check.yml index 60b506eb..99b81e84 100644 --- a/.github/workflows/compile-check.yml +++ b/.github/workflows/compile-check.yml @@ -48,7 +48,7 @@ jobs: shell: bash run: | if [ "${{ matrix.java }}" -ge 17 ]; then - mvn clean verify -P with-integration-tests -P with-springboot -ntp + mvn clean verify -P with-springboot -ntp else - mvn clean verify -P with-integration-tests -ntp + mvn clean verify -ntp fi diff --git a/iotdb-spring-boot-starter/pom.xml b/iotdb-spring-boot-starter/pom.xml index 1c733aca..ee1963f1 100644 --- a/iotdb-spring-boot-starter/pom.xml +++ b/iotdb-spring-boot-starter/pom.xml @@ -47,11 +47,20 @@ + + org.apache.iotdb + isession + ${iotdb.version} + org.apache.iotdb iotdb-session ${iotdb.version} + + org.springframework.boot + spring-boot + org.springframework.boot spring-boot-starter @@ -68,4 +77,23 @@ ${spring-boot3.version} + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + org.apache.iotdb:isession + + + + org.springframework.boot:spring-boot-starter + org.springframework.boot:spring-boot-configuration-processor + + + + + From 571bb8de2f73f893fd780e728bbf46895166ee54 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 17:36:55 +0800 Subject: [PATCH 6/8] fix jdk17 compile --- iotdb-spring-boot-starter/pom.xml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/iotdb-spring-boot-starter/pom.xml b/iotdb-spring-boot-starter/pom.xml index ee1963f1..298d18a9 100644 --- a/iotdb-spring-boot-starter/pom.xml +++ b/iotdb-spring-boot-starter/pom.xml @@ -33,14 +33,15 @@ 17 17 UTF-8 - 3.4.5 + 3.4.5 + 6.2.6 org.springframework.boot spring-boot-dependencies - ${spring-boot3.version} + ${spring-boot.version} pom import @@ -60,22 +61,29 @@ org.springframework.boot spring-boot + ${spring-boot.version} org.springframework.boot spring-boot-starter - ${spring-boot3.version} + ${spring-boot.version} org.springframework.boot spring-boot-autoconfigure - ${spring-boot3.version} + ${spring-boot.version} org.springframework.boot spring-boot-configuration-processor - ${spring-boot3.version} + ${spring-boot.version} + + org.springframework + spring-context + ${spring.version} + + From 43d1d9e6eb36e4b6207c4cc2d3099b596932f1ed Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 17:50:15 +0800 Subject: [PATCH 7/8] remove some infomation --- .../src/main/resources/application.properties | 2 +- .../SpringBootIoTDBApplicationTests.java | 2 +- iotdb-spring-boot-starter/pom.xml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/iotdb-spring-boot-start/src/main/resources/application.properties b/examples/iotdb-spring-boot-start/src/main/resources/application.properties index 98953f12..19e61953 100644 --- a/examples/iotdb-spring-boot-start/src/main/resources/application.properties +++ b/examples/iotdb-spring-boot-start/src/main/resources/application.properties @@ -18,7 +18,7 @@ spring.application.name=iotdb-spring-boot-start -iotdb.session.url=172.20.31.56:6668 +iotdb.session.url=127.0.0.1:6667 iotdb.session.password=root iotdb.session.username=root iotdb.session.database=wind diff --git a/examples/iotdb-spring-boot-start/src/test/java/org/apache/iotdb/iotdbspringbootstartexample/SpringBootIoTDBApplicationTests.java b/examples/iotdb-spring-boot-start/src/test/java/org/apache/iotdb/iotdbspringbootstartexample/SpringBootIoTDBApplicationTests.java index 0e989594..d5ec0d99 100644 --- a/examples/iotdb-spring-boot-start/src/test/java/org/apache/iotdb/iotdbspringbootstartexample/SpringBootIoTDBApplicationTests.java +++ b/examples/iotdb-spring-boot-start/src/test/java/org/apache/iotdb/iotdbspringbootstartexample/SpringBootIoTDBApplicationTests.java @@ -30,7 +30,7 @@ public class SpringBootIoTDBApplicationTests { @Autowired private IoTDBService iotdbService; - @Test + // @Test void contextLoads() throws IoTDBConnectionException, StatementExecutionException { iotdbService.querySessionPool(); iotdbService.queryTableSessionPool(); diff --git a/iotdb-spring-boot-starter/pom.xml b/iotdb-spring-boot-starter/pom.xml index 298d18a9..bad6765b 100644 --- a/iotdb-spring-boot-starter/pom.xml +++ b/iotdb-spring-boot-starter/pom.xml @@ -83,7 +83,6 @@ spring-context ${spring.version} - From fc0d64e017ac9d0a9a7216271783c301f40d016b Mon Sep 17 00:00:00 2001 From: CritasWang Date: Sun, 27 Apr 2025 18:05:22 +0800 Subject: [PATCH 8/8] change pom name --- examples/iotdb-spring-boot-start/pom.xml | 4 ++- examples/mybatis-generator/pom.xml | 1 + examples/mybatisplus-generator/pom.xml | 43 ++++++++++++++++++------ iotdb-spring-boot-starter/pom.xml | 1 + mybatis-generator/pom.xml | 1 + 5 files changed, 38 insertions(+), 12 deletions(-) diff --git a/examples/iotdb-spring-boot-start/pom.xml b/examples/iotdb-spring-boot-start/pom.xml index 919f52c1..8090af8a 100644 --- a/examples/iotdb-spring-boot-start/pom.xml +++ b/examples/iotdb-spring-boot-start/pom.xml @@ -31,10 +31,12 @@ org.apache.iotdb iotdb-spring-boot-start-example 2.0.2-SNAPHOT - iotdb-spring-boot-start + IoTDB: Example: SpringBoot Starter iotdb-spring-boot-start 17 + 3.4.5 + 6.2.6 diff --git a/examples/mybatis-generator/pom.xml b/examples/mybatis-generator/pom.xml index f45ada74..c7d73e3f 100644 --- a/examples/mybatis-generator/pom.xml +++ b/examples/mybatis-generator/pom.xml @@ -28,6 +28,7 @@ ../../pom.xml mybatis-generator-example + IoTDB: Example: Mybatis Generator 2.0.2-SNAPHOT diff --git a/examples/mybatisplus-generator/pom.xml b/examples/mybatisplus-generator/pom.xml index 80da7714..729e2de8 100644 --- a/examples/mybatisplus-generator/pom.xml +++ b/examples/mybatisplus-generator/pom.xml @@ -29,12 +29,15 @@ org.apache.iotdb mybatisplus-generator-example + IoTDB: Example: Mybatis Plus Generator 2.0.2-SNAPHOT 3.5.10 17 17 UTF-8 + 3.4.5 + 6.2.6 @@ -55,7 +58,7 @@ org.apache.velocity velocity-engine-core - 2.0 + 2.4.1 org.apache.iotdb @@ -65,22 +68,17 @@ org.springframework.boot spring-boot-starter - 3.4.3 + ${spring-boot.version} org.springframework.boot spring-boot-starter-web - 3.4.3 + ${spring-boot.version} - io.springfox - springfox-swagger2 - 3.0.0 - - - io.springfox - springfox-swagger-ui - 3.0.0 + org.springdoc + springdoc-openapi-starter-webmvc-ui + 2.8.6 org.projectlombok @@ -88,4 +86,27 @@ 1.18.36 + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + org.apache.iotdb:isession + + + + com.baomidou:mybatis-plus-spring-boot3-starter + org.apache.velocity:velocity-engine-core + org.springframework.boot:spring-boot-starter + org.springframework.boot:spring-boot-starter-web + org.springdoc:springdoc-openapi-starter-webmvc-ui + org.projectlombok:lombok + + + + + diff --git a/iotdb-spring-boot-starter/pom.xml b/iotdb-spring-boot-starter/pom.xml index bad6765b..cd2ad444 100644 --- a/iotdb-spring-boot-starter/pom.xml +++ b/iotdb-spring-boot-starter/pom.xml @@ -28,6 +28,7 @@ org.apache.iotdb iotdb-spring-boot-starter + IoTDB Extras: SpringBoot Starter 2.0.2-SNAPSHOT 17 diff --git a/mybatis-generator/pom.xml b/mybatis-generator/pom.xml index 43ec0e44..803d02cb 100644 --- a/mybatis-generator/pom.xml +++ b/mybatis-generator/pom.xml @@ -8,6 +8,7 @@ org.apache.iotdb mybatis-generator-plugin + IoTDB Extras: Mybatis Generator Plugin 2.0.2-SNAPSHOT jar