diff --git a/.circleci/config.yml b/.circleci/config.yml
index 809c7c5ee77..e5b07abd280 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -109,7 +109,7 @@ jobs:
parameters:
maven-image:
type: string
- default: &default-maven-image "cimg/openjdk:8.0"
+ default: &default-maven-image "cimg/openjdk:17.0"
influxdb-image:
type: string
default: &default-influxdb-image "influxdb:latest"
@@ -250,11 +250,6 @@ workflows:
- check-dependencies
- check-generate-site
- check-licenses
- - tests-java:
- name: jdk-8
- - tests-java:
- name: jdk-11
- maven-image: "cimg/openjdk:11.0"
- tests-java:
name: jdk-17
maven-image: "cimg/openjdk:17.0"
@@ -262,7 +257,10 @@ workflows:
name: jdk-20
maven-image: "cimg/openjdk:20.0"
- tests-java:
- name: jdk-8-nightly
+ name: jdk-21
+ maven-image: "cimg/openjdk:21.0"
+ - tests-java:
+ name: jdk-17-nightly
influxdb-image: "quay.io/influxdb/influxdb:nightly"
- tests-java:
name: client-backpressure
@@ -275,11 +273,10 @@ workflows:
- check-dependencies
- check-generate-site
- check-licenses
- - jdk-8
- - jdk-11
- jdk-17
- jdk-20
- - jdk-8-nightly
+ - jdk-21
+ - jdk-17-nightly
filters:
branches:
only: master
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d548e319adc..87afb5541ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,10 +1,13 @@
## 7.0.0 [unreleased]
+:warning: This client version discontinues support for JDK 8 and 11. The minimum supported JDK version is now JDK 17.
+
:warning: This client version discontinues support for Akka Streams and introduces support for Pekko Streams instead. Apache Pekko is a fork of [Akka](https://github.com/akka/akka) 2.6.x, created after the Akka project adopted the Business Source License, which is not compatible with open-source usage.
### Features
1. [#661](https://github.com/influxdata/influxdb-client-java/pull/661): Replaced Akka Streams with Pekko Streams in the Scala client.
-
+1. [#673](https://github.com/influxdata/influxdb-client-java/pull/673): Upgrade SpringBoot to v3 and Spring to v6
+1. [#673](https://github.com/influxdata/influxdb-client-java/pull/673): Disable support for old JDKs (< 17)
### Dependencies
@@ -16,6 +19,10 @@ Update dependencies:
- [#667](https://github.com/influxdata/influxdb-client-java/pull/667): `rxjava` to `3.1.8`
- [#669](https://github.com/influxdata/influxdb-client-java/pull/669): `commons-lang3` to `3.14.0`
- [#670](https://github.com/influxdata/influxdb-client-java/pull/670): `micrometer-registry-influx` to `1.12.1`
+ - [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `spring-boot` to `3.2.2`
+ - [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `spring` to `6.1.3`
+ - [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `scala-library` to `2.13.11`
+ - [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `okhttp` to `4.12.0`
#### Maven:
- [#671](https://github.com/influxdata/influxdb-client-java/pull/671): `maven-javadoc-plugin` to `3.6.3`
diff --git a/README.md b/README.md
index d78db875c38..a8720ed8da7 100644
--- a/README.md
+++ b/README.md
@@ -393,12 +393,12 @@ public class FluxExample {
## Build Requirements
-* Java 1.8+ (tested with jdk8)
+* Java 17+ (tested with JDK 17)
+ * :warning: If you want to use older version of JDK, you have to use the 6.x version of the client.
* Maven 3.0+ (tested with maven 3.5.0)
* Docker daemon running
* The latest InfluxDB 2.x and InfluxDB 1.X docker instances, which can be started using the `./scripts/influxdb-restart.sh` script
-
Once these are in place you can build influxdb-client-java with all tests with:
diff --git a/client-core/pom.xml b/client-core/pom.xml
index 99844c61900..f4487bfb5e5 100644
--- a/client-core/pom.xml
+++ b/client-core/pom.xml
@@ -98,20 +98,6 @@
com.squareup.okiookio
-
-
- org.jetbrains.kotlin
- kotlin-stdlib
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-common
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-jdk8
-
-
diff --git a/client-kotlin/pom.xml b/client-kotlin/pom.xml
index b25619df4e8..12fa9bae9b3 100644
--- a/client-kotlin/pom.xml
+++ b/client-kotlin/pom.xml
@@ -86,7 +86,7 @@
${kotlin.version}true
- 1.8
+ 17
diff --git a/client-reactive/src/main/java/com/influxdb/client/reactive/internal/QueryReactiveApiImpl.java b/client-reactive/src/main/java/com/influxdb/client/reactive/internal/QueryReactiveApiImpl.java
index 773f058de92..4448e082abe 100644
--- a/client-reactive/src/main/java/com/influxdb/client/reactive/internal/QueryReactiveApiImpl.java
+++ b/client-reactive/src/main/java/com/influxdb/client/reactive/internal/QueryReactiveApiImpl.java
@@ -44,7 +44,6 @@
import io.reactivex.rxjava3.core.Flowable;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.ObservableEmitter;
-import org.jetbrains.annotations.NotNull;
import org.reactivestreams.Publisher;
/**
@@ -355,7 +354,7 @@ public Publisher queryRaw(@Nonnull final Publisher queryStream,
.map(q -> new Query().query(q).dialect(dialect)), dialect, org);
}
- @NotNull
+ @Nonnull
private Consumer onError(final ObservableEmitter> subscriber) {
return throwable -> {
if (!subscriber.isDisposed()) {
@@ -366,4 +365,4 @@ private Consumer onError(final ObservableEmitter> subscriber) {
}
};
}
-}
\ No newline at end of file
+}
diff --git a/client-scala/cross/2.13/pom.xml b/client-scala/cross/2.13/pom.xml
index 3908623cb4a..fdebc016ade 100644
--- a/client-scala/cross/2.13/pom.xml
+++ b/client-scala/cross/2.13/pom.xml
@@ -72,7 +72,7 @@
- 2.13.9
+ 2.13.11
diff --git a/client/src/test/java/com/influxdb/client/WriteApiTest.java b/client/src/test/java/com/influxdb/client/WriteApiTest.java
index 853aa7956fe..c79969116f6 100644
--- a/client/src/test/java/com/influxdb/client/WriteApiTest.java
+++ b/client/src/test/java/com/influxdb/client/WriteApiTest.java
@@ -46,6 +46,7 @@
import com.influxdb.exceptions.RequestEntityTooLargeException;
import com.influxdb.exceptions.UnauthorizedException;
+import com.influxdb.internal.UserAgentInterceptor;
import io.reactivex.rxjava3.schedulers.TestScheduler;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.RecordedRequest;
@@ -1012,7 +1013,15 @@ void userAgent() throws InterruptedException {
String userAgent = recordedRequest.getHeader("User-Agent");
- Assertions.assertThat(userAgent).startsWith("influxdb-client-java/7.");
+ String currentVersion = UserAgentInterceptor.class.getPackage().getImplementationVersion();
+
+ // not all test situations will get correct version from manifest at this point
+ String expectVersion = currentVersion == null
+ ? "unknown"
+ : currentVersion.substring(0, currentVersion.indexOf(".") + 1);
+
+ Assertions.assertThat(userAgent).startsWith(String.format("influxdb-client-java/%s", expectVersion));
+
}
@Test
diff --git a/examples/pom.xml b/examples/pom.xml
index 021c426f517..660121fed85 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -46,7 +46,7 @@
${kotlin.version}true
- 1.8
+ 17
@@ -182,4 +182,4 @@
-
\ No newline at end of file
+
diff --git a/karaf/karaf-assembly/pom.xml b/karaf/karaf-assembly/pom.xml
index c599a5bf5c5..f030528b50d 100644
--- a/karaf/karaf-assembly/pom.xml
+++ b/karaf/karaf-assembly/pom.xml
@@ -50,7 +50,7 @@
default-assembly
- 1.8
+ 17frameworkinstance
diff --git a/karaf/karaf-features/pom.xml b/karaf/karaf-features/pom.xml
index cc98038d234..3218ebd75c3 100644
--- a/karaf/karaf-features/pom.xml
+++ b/karaf/karaf-features/pom.xml
@@ -56,7 +56,7 @@
default-verify
- 1.8
+ 17org.apache.karaf.features:frameworkmvn:org.apache.karaf.features/framework/${karaf.version}/xml/features
diff --git a/pom.xml b/pom.xml
index 51fdcf21031..68a20b650dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -109,7 +109,7 @@
UTF-82.9.0
- 4.11.0
+ 4.12.03.7.02.10.13.1.8
@@ -138,7 +138,7 @@
-
+
org.apache.maven.pluginsmaven-source-plugin
@@ -171,8 +171,9 @@
maven-compiler-plugin3.11.0
-
- 1.8
+
+ 17
+ 17
@@ -413,7 +414,7 @@
true
-
+
com.mycilalicense-maven-plugin
@@ -739,7 +740,7 @@
kotlinx-coroutines-core-jvm${kotlin-coroutines.version}
-
+
diff --git a/spring/README.md b/spring/README.md
index ea45d0e5a71..0f998914b8a 100644
--- a/spring/README.md
+++ b/spring/README.md
@@ -10,10 +10,9 @@
## Spring Boot Compatibility
-:warning: The client version `6.4.0` upgrades the `OkHttp` library to version `4.10.0`. The version `3.12.x` is no longer supported - [okhttp#requirements](https://github.com/square/okhttp#requirements).
+:warning: The client version `7.0.0` upgrades the `OkHttp` library to version `4.12.0`. The version `3.x.x` is no longer supported - [okhttp#requirements](https://github.com/square/okhttp#requirements).
-The `spring-boot` supports the `OkHttp:4.10.0` from the version `3.0.0-M4` - [spring-boot/OkHttp 4.10,0](https://github.com/spring-projects/spring-boot/commit/6cb1a958a5d43a2fffb7e7635e3be9c0ee15f3b1).
-For the older version of `spring-boot` you have to configure Spring Boot's `okhttp3.version` property:
+The `spring-boot` supports the `OkHttp:4.12.0`. For the older version of `spring-boot` you have to configure Spring Boot's `okhttp3.version` property:
```xml
@@ -43,7 +42,7 @@ influx:
connectTimeout: 5s # Connection timeout for OkHttpClient. (Default: 10s)
```
-:warning: If you are using a version of Spring Boot prior to 2.7, auto-configuration will not take effect.
+:warning: If you are using a version of **Spring Boot prior to 2.7 with 6.x version of the client**, auto-configuration will not take effect.
You need to add the `@ComponentScan` annotation to your Spring Boot startup class and include com.influxdb.spring.influx in the basePackages.
For example:
```java
@@ -62,7 +61,7 @@ If you want to configure the `InfluxDBClientReactive` client, you need to includ
## Actuator for InfluxDB2 micrometer registry
-To enable export metrics to **InfluxDB 2.x** you need to include `micrometer-core` on your classpath.
+To enable export metrics to **InfluxDB 2.x** you need to include `micrometer-registry-influx` on your classpath.
(Due to package conflicts, the `spring-boot-actuator` may have relied on an earlier version of the `micrometer-core`. Therefore, it is necessary to specify a higher version here.)
The default configuration can be override via properties:
@@ -81,24 +80,23 @@ management.metrics.export.influx:
num-threads: 2 # Number of threads to use with the metrics publishing scheduler. (Default: 2)
batch-size: 10000 # Number of measurements per request to use for this backend. If more measurements are found, then multiple requests will be made. (Default: 10000)
```
-
Maven dependency:
```xml
io.micrometer
- micrometer-core
- 1.11.2
+ micrometer-registry-influx
+ 1.12.2
```
or when using with Gradle:
```groovy
dependencies {
- implementation "io.micrometer:micrometer-core:1.11.2"
+ implementation "io.micrometer:micrometer-registry-influx:1.12.2"
}
-```
-
+```
+
## Actuator for InfluxDB2 health
The `/health` endpoint can monitor an **InfluxDB 2.x** server.
diff --git a/spring/pom.xml b/spring/pom.xml
index 48192964cf0..386cdbc1fc1 100644
--- a/spring/pom.xml
+++ b/spring/pom.xml
@@ -73,8 +73,8 @@
1.12.1
- 2.7.17
- 5.3.26
+ 3.2.2
+ 6.1.3
@@ -158,7 +158,7 @@
${mockito.version}test
-
+
org.springframework.bootspring-boot-configuration-processor
@@ -168,4 +168,4 @@
-
\ No newline at end of file
+
diff --git a/spring/src/main/java/com/influxdb/spring/health/InfluxDB2HealthIndicatorAutoConfiguration.java b/spring/src/main/java/com/influxdb/spring/health/InfluxDB2HealthIndicatorAutoConfiguration.java
index 39d05d6ba9d..58467860b75 100644
--- a/spring/src/main/java/com/influxdb/spring/health/InfluxDB2HealthIndicatorAutoConfiguration.java
+++ b/spring/src/main/java/com/influxdb/spring/health/InfluxDB2HealthIndicatorAutoConfiguration.java
@@ -50,10 +50,14 @@
public class InfluxDB2HealthIndicatorAutoConfiguration
extends CompositeHealthContributorConfiguration {
+ public InfluxDB2HealthIndicatorAutoConfiguration() {
+ super(InfluxDB2HealthIndicator::new);
+ }
+
@Bean
@ConditionalOnMissingBean(name = { "influxDB2HealthIndicator", "influxDB2HealthContributor" })
public HealthContributor influxDbHealthContributor(final Map influxDBClients) {
return createContributor(influxDBClients);
}
-}
\ No newline at end of file
+}