Skip to content

Commit c28b9db

Browse files
bednarkarel-rehor
andauthored
feat: upgrade Spring to v6, SpringBoot to v3 (#673)
* feat: upgrade Spring to v6, SpringBoot to v3 * chore: drop support for old JDK, min required JDK is 17 * fix: dependencies to kotlin stdlib * fix: dependencies * fix: scala version * docs: JDK warning * docs: libraries changes * test: fix assert to reenable local build without install * chore: revert previous commit - breaks CI build * test: fix assert of User-Agent in local builds --------- Co-authored-by: karel rehor <[email protected]>
1 parent 50e1142 commit c28b9db

File tree

15 files changed

+60
-59
lines changed

15 files changed

+60
-59
lines changed

.circleci/config.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
parameters:
110110
maven-image:
111111
type: string
112-
default: &default-maven-image "cimg/openjdk:8.0"
112+
default: &default-maven-image "cimg/openjdk:17.0"
113113
influxdb-image:
114114
type: string
115115
default: &default-influxdb-image "influxdb:latest"
@@ -250,19 +250,17 @@ workflows:
250250
- check-dependencies
251251
- check-generate-site
252252
- check-licenses
253-
- tests-java:
254-
name: jdk-8
255-
- tests-java:
256-
name: jdk-11
257-
maven-image: "cimg/openjdk:11.0"
258253
- tests-java:
259254
name: jdk-17
260255
maven-image: "cimg/openjdk:17.0"
261256
- tests-java:
262257
name: jdk-20
263258
maven-image: "cimg/openjdk:20.0"
264259
- tests-java:
265-
name: jdk-8-nightly
260+
name: jdk-21
261+
maven-image: "cimg/openjdk:21.0"
262+
- tests-java:
263+
name: jdk-17-nightly
266264
influxdb-image: "quay.io/influxdb/influxdb:nightly"
267265
- tests-java:
268266
name: client-backpressure
@@ -275,11 +273,10 @@ workflows:
275273
- check-dependencies
276274
- check-generate-site
277275
- check-licenses
278-
- jdk-8
279-
- jdk-11
280276
- jdk-17
281277
- jdk-20
282-
- jdk-8-nightly
278+
- jdk-21
279+
- jdk-17-nightly
283280
filters:
284281
branches:
285282
only: master

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
## 7.0.0 [unreleased]
22

3+
:warning: This client version discontinues support for JDK 8 and 11. The minimum supported JDK version is now JDK 17.
4+
35
: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.
46

57
### Features
68
1. [#661](https://github.com/influxdata/influxdb-client-java/pull/661): Replaced Akka Streams with Pekko Streams in the Scala client.
7-
9+
1. [#673](https://github.com/influxdata/influxdb-client-java/pull/673): Upgrade SpringBoot to v3 and Spring to v6
10+
1. [#673](https://github.com/influxdata/influxdb-client-java/pull/673): Disable support for old JDKs (< 17)
811

912
### Dependencies
1013

@@ -16,6 +19,10 @@ Update dependencies:
1619
- [#667](https://github.com/influxdata/influxdb-client-java/pull/667): `rxjava` to `3.1.8`
1720
- [#669](https://github.com/influxdata/influxdb-client-java/pull/669): `commons-lang3` to `3.14.0`
1821
- [#670](https://github.com/influxdata/influxdb-client-java/pull/670): `micrometer-registry-influx` to `1.12.1`
22+
- [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `spring-boot` to `3.2.2`
23+
- [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `spring` to `6.1.3`
24+
- [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `scala-library` to `2.13.11`
25+
- [#673](https://github.com/influxdata/influxdb-client-java/pull/673): `okhttp` to `4.12.0`
1926

2027
#### Maven:
2128
- [#671](https://github.com/influxdata/influxdb-client-java/pull/671): `maven-javadoc-plugin` to `3.6.3`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,12 @@ public class FluxExample {
393393

394394
## Build Requirements
395395

396-
* Java 1.8+ (tested with jdk8)
396+
* Java 17+ (tested with JDK 17)
397+
* :warning: If you want to use older version of JDK, you have to use the 6.x version of the client.
397398
* Maven 3.0+ (tested with maven 3.5.0)
398399
* Docker daemon running
399400
* The latest InfluxDB 2.x and InfluxDB 1.X docker instances, which can be started using the `./scripts/influxdb-restart.sh` script
400401

401-
402402
Once these are in place you can build influxdb-client-java with all tests with:
403403

404404

client-core/pom.xml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,6 @@
9898
<dependency>
9999
<groupId>com.squareup.okio</groupId>
100100
<artifactId>okio</artifactId>
101-
<exclusions>
102-
<exclusion>
103-
<groupId>org.jetbrains.kotlin</groupId>
104-
<artifactId>kotlin-stdlib</artifactId>
105-
</exclusion>
106-
<exclusion>
107-
<groupId>org.jetbrains.kotlin</groupId>
108-
<artifactId>kotlin-stdlib-common</artifactId>
109-
</exclusion>
110-
<exclusion>
111-
<groupId>org.jetbrains.kotlin</groupId>
112-
<artifactId>kotlin-stdlib-jdk8</artifactId>
113-
</exclusion>
114-
</exclusions>
115101
</dependency>
116102

117103
<dependency>

client-kotlin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<version>${kotlin.version}</version>
8787
<configuration>
8888
<nowarn>true</nowarn>
89-
<jvmTarget>1.8</jvmTarget>
89+
<jvmTarget>17</jvmTarget>
9090
</configuration>
9191
<executions>
9292
<execution>

client-reactive/src/main/java/com/influxdb/client/reactive/internal/QueryReactiveApiImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
import io.reactivex.rxjava3.core.Flowable;
4545
import io.reactivex.rxjava3.core.Observable;
4646
import io.reactivex.rxjava3.core.ObservableEmitter;
47-
import org.jetbrains.annotations.NotNull;
4847
import org.reactivestreams.Publisher;
4948

5049
/**
@@ -355,7 +354,7 @@ public Publisher<String> queryRaw(@Nonnull final Publisher<String> queryStream,
355354
.map(q -> new Query().query(q).dialect(dialect)), dialect, org);
356355
}
357356

358-
@NotNull
357+
@Nonnull
359358
private Consumer<Throwable> onError(final ObservableEmitter<?> subscriber) {
360359
return throwable -> {
361360
if (!subscriber.isDisposed()) {
@@ -366,4 +365,4 @@ private Consumer<Throwable> onError(final ObservableEmitter<?> subscriber) {
366365
}
367366
};
368367
}
369-
}
368+
}

client-scala/cross/2.13/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</scm>
7373

7474
<properties>
75-
<scala.version>2.13.9</scala.version>
75+
<scala.version>2.13.11</scala.version>
7676
</properties>
7777

7878
<build>

client/src/test/java/com/influxdb/client/WriteApiTest.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
import com.influxdb.exceptions.RequestEntityTooLargeException;
4747
import com.influxdb.exceptions.UnauthorizedException;
4848

49+
import com.influxdb.internal.UserAgentInterceptor;
4950
import io.reactivex.rxjava3.schedulers.TestScheduler;
5051
import okhttp3.mockwebserver.MockResponse;
5152
import okhttp3.mockwebserver.RecordedRequest;
@@ -1012,7 +1013,15 @@ void userAgent() throws InterruptedException {
10121013

10131014
String userAgent = recordedRequest.getHeader("User-Agent");
10141015

1015-
Assertions.assertThat(userAgent).startsWith("influxdb-client-java/7.");
1016+
String currentVersion = UserAgentInterceptor.class.getPackage().getImplementationVersion();
1017+
1018+
// not all test situations will get correct version from manifest at this point
1019+
String expectVersion = currentVersion == null
1020+
? "unknown"
1021+
: currentVersion.substring(0, currentVersion.indexOf(".") + 1);
1022+
1023+
Assertions.assertThat(userAgent).startsWith(String.format("influxdb-client-java/%s", expectVersion));
1024+
10161025
}
10171026

10181027
@Test

examples/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<version>${kotlin.version}</version>
4747
<configuration>
4848
<nowarn>true</nowarn>
49-
<jvmTarget>1.8</jvmTarget>
49+
<jvmTarget>17</jvmTarget>
5050
</configuration>
5151
<executions>
5252
<execution>
@@ -182,4 +182,4 @@
182182
</repositories>
183183

184184

185-
</project>
185+
</project>

karaf/karaf-assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<execution>
5151
<id>default-assembly</id>
5252
<configuration>
53-
<javase>1.8</javase>
53+
<javase>17</javase>
5454
<framework>framework</framework>
5555
<bootFeatures>
5656
<feature>instance</feature>

0 commit comments

Comments
 (0)