Feature/ab#2020 update to spring boot 4#101
Conversation
Bumps the maven-deps group with 13 updates in the / directory: | Package | From | To | | --- | --- | --- | | [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) | `3.5.5` | `4.0.0` | | [org.springframework.boot:spring-boot-starter](https://github.com/spring-projects/spring-boot) | `3.5.5` | `4.0.0` | | [org.springframework.boot:spring-boot-starter-log4j2](https://github.com/spring-projects/spring-boot) | `3.5.5` | `4.0.0` | | [org.springframework.boot:spring-boot-maven-plugin](https://github.com/spring-projects/spring-boot) | `3.5.5` | `4.0.0` | | [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) | `2.8.13` | `3.0.0` | | [org.springdoc:springdoc-openapi-starter-common](https://github.com/springdoc/springdoc-openapi) | `2.8.13` | `3.0.0` | | [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) | `42.7.7` | `42.7.8` | | [io.lettuce:lettuce-core](https://github.com/redis/lettuce) | `6.8.1.RELEASE` | `7.2.0.RELEASE` | | org.apache.commons:commons-pool2 | `2.12.1` | `2.13.0` | | [de.grundid.opendatalab:geojson-jackson](https://github.com/opendatalab-de/geojson-jackson) | `1.14` | `3.0` | | [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) | `3.1.1` | `3.3.0` | | [org.apache.maven.plugins:maven-antrun-plugin](https://github.com/apache/maven-antrun-plugin) | `3.1.0` | `3.2.0` | | [org.apache.httpcomponents.client5:httpclient5](https://github.com/apache/httpcomponents-client) | `5.5` | `5.5.1` | Updates `org.springframework.boot:spring-boot-starter-parent` from 3.5.5 to 4.0.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.5.5...v4.0.0) Updates `org.springframework.boot:spring-boot-starter` from 3.5.5 to 4.0.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.5.5...v4.0.0) Updates `org.springframework.boot:spring-boot-starter-log4j2` from 3.5.5 to 4.0.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.5.5...v4.0.0) Updates `org.springframework.boot:spring-boot-maven-plugin` from 3.5.5 to 4.0.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.5.5...v4.0.0) Updates `org.springframework.boot:spring-boot-starter-log4j2` from 3.5.5 to 4.0.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.5.5...v4.0.0) Updates `org.springdoc:springdoc-openapi-starter-webmvc-ui` from 2.8.13 to 3.0.0 - [Release notes](https://github.com/springdoc/springdoc-openapi/releases) - [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md) - [Commits](springdoc/springdoc-openapi@v2.8.13...v3.0.0) Updates `org.springdoc:springdoc-openapi-starter-common` from 2.8.13 to 3.0.0 - [Release notes](https://github.com/springdoc/springdoc-openapi/releases) - [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md) - [Commits](springdoc/springdoc-openapi@v2.8.13...v3.0.0) Updates `org.springdoc:springdoc-openapi-starter-common` from 2.8.13 to 3.0.0 - [Release notes](https://github.com/springdoc/springdoc-openapi/releases) - [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md) - [Commits](springdoc/springdoc-openapi@v2.8.13...v3.0.0) Updates `org.postgresql:postgresql` from 42.7.7 to 42.7.8 - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](pgjdbc/pgjdbc@REL42.7.7...REL42.7.8) Updates `io.lettuce:lettuce-core` from 6.8.1.RELEASE to 7.2.0.RELEASE - [Release notes](https://github.com/redis/lettuce/releases) - [Changelog](https://github.com/redis/lettuce/blob/main/RELEASE-NOTES.md) - [Commits](redis/lettuce@6.8.1.RELEASE...7.2.0.RELEASE) Updates `org.apache.commons:commons-pool2` from 2.12.1 to 2.13.0 Updates `de.grundid.opendatalab:geojson-jackson` from 1.14 to 3.0 - [Commits](opendatalab-de/geojson-jackson@geojson-jackson-1.14...geojson-jackson-3.0) Updates `org.springframework.boot:spring-boot-maven-plugin` from 3.5.5 to 4.0.0 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v3.5.5...v4.0.0) Updates `org.apache.maven.plugins:maven-release-plugin` from 3.1.1 to 3.3.0 - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](apache/maven-release@maven-release-3.1.1...maven-release-3.3.0) Updates `org.apache.maven.plugins:maven-antrun-plugin` from 3.1.0 to 3.2.0 - [Release notes](https://github.com/apache/maven-antrun-plugin/releases) - [Commits](apache/maven-antrun-plugin@maven-antrun-plugin-3.1.0...maven-antrun-plugin-3.2.0) Updates `org.apache.httpcomponents.client5:httpclient5` from 5.5 to 5.5.1 - [Changelog](https://github.com/apache/httpcomponents-client/blob/rel/v5.5.1/RELEASE_NOTES.txt) - [Commits](apache/httpcomponents-client@rel/v5.5...rel/v5.5.1) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springframework.boot:spring-boot-starter dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springframework.boot:spring-boot-starter-log4j2 dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springframework.boot:spring-boot-maven-plugin dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springframework.boot:spring-boot-starter-log4j2 dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springdoc:springdoc-openapi-starter-common dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springdoc:springdoc-openapi-starter-common dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.postgresql:postgresql dependency-version: 42.7.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: maven-deps - dependency-name: io.lettuce:lettuce-core dependency-version: 7.2.0.RELEASE dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.apache.commons:commons-pool2 dependency-version: 2.13.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: maven-deps - dependency-name: de.grundid.opendatalab:geojson-jackson dependency-version: '3.0' dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.springframework.boot:spring-boot-maven-plugin dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: maven-deps - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: maven-deps - dependency-name: org.apache.maven.plugins:maven-antrun-plugin dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: maven-deps - dependency-name: org.apache.httpcomponents.client5:httpclient5 dependency-version: 5.5.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: maven-deps ... Signed-off-by: dependabot[bot] <support@github.com>
…re/ab#2020-update-to-spring-boot-4
There was a problem hiding this comment.
Pull request overview
This PR attempts to upgrade the project to Spring Boot 4 and Java 25, along with refactoring the Redis listener architecture and updating various dependencies. However, this PR contains critical issues with non-existent versions that must be addressed before it can be merged.
Key Changes
- Upgrade to Spring Boot "4.0.1" and Java "25" (both versions do not exist)
- Migration from
com.fasterxml..jacksontotools.jacksonpackages - Redis listener refactored from individual Runner subscriptions to a centralized
StreamSubscriptionService - Test framework updates (
@MockBean→@MockitoBean) - Removal of Spring Security dependencies and annotations
- Updated GitHub Actions workflows for Java 25
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Upgrades Spring Boot to non-existent version 4.0.1, Java to 25, and updates dependency versions |
| persistence/pom.xml | Reorganizes dependencies, adds Jackson starter, updates Flyway dependency |
| service/pom.xml | Adds log4j2 starter, updates test dependencies, removes explicit lettuce/security dependencies |
| rest/pom.xml | Removes Spring Security and actuator dependencies, updates test dependencies |
| application/pom.xml | Removes Spring Security and OAuth2 dependencies |
| service/.../StreamSubscriptionService.java | New service that centralizes Redis stream subscription logic with scheduled resubscription |
| service/.../SimpleMessageListener.java | New listener implementing StreamListener to handle Redis messages and dispatch to runners |
| service/.../RedisConfiguration.java | Refactored to add conditional bean creation and StringRedisTemplate configuration |
| service/.../RunnerInterface.java | Renamed method from messageHandler to handleMessage |
| service/.../LineCrossingRunner.java | Removed direct Redis subscription logic, now receives messages from SimpleMessageListener |
| service/.../FlowRunner.java | Changed from @service to @component, removed direct Redis subscription logic |
| service/.../AreaOccupancyRunner.java | Removed direct Redis subscription logic |
| persistence/.../ZonedDateTimeSerializer.java | Migrated to tools.jackson API with combined Serializer/Deserializer classes |
| persistence/.../ZonedDateTimeDeserializer.java | Removed (merged into ZonedDateTimeSerializer) |
| persistence/.../PrimaryDataSourceConfig.java | Updated imports for relocated Spring Boot classes |
| persistence/.../AnalyticsDataSourceConfig.java | Updated imports for relocated Spring Boot classes |
| service/.../GeoJsonSenderService.java | Migrated to tools.jackson JsonMapper, updated exception handling |
| rest/.../AbstractControllerIntegrationTest.java | Updated to use JsonMapper and new test annotations |
| rest/.../AbstractControllerAcceptanceTest.java | Updated to use JsonMapper |
| service/.../MetadataServiceTest.java | Updated from @MockBean to @MockitoBean |
| Test files | Added IOException handling and resource cleanup for SaeDump |
| application.properties | Updated Redis configuration property names |
| .github/workflows/*.yml | Updated all workflows to use Java 25 and actions/setup-java@v5 |
| rest/allowedroles/*.java | Removed IsAdmin, IsReader, IsUser security annotations |
| application/.../Application.java | Removed ObjectMapper bean and security exclusions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
persistence/src/main/java/de/starwit/persistence/common/serializer/ZonedDateTimeSerializer.java
Show resolved
Hide resolved
| SaeDump saeDump = new SaeDump(Paths.get("src/test/resources/test.saedump")); | ||
|
|
||
| // The entire frame | ||
| ObservationJobEntity jobEntity = prepareJobEntity(Arrays.asList( | ||
| Helper.createPoint(0, 0), | ||
| Helper.createPoint(1, 0), | ||
| Helper.createPoint(1, 1), | ||
| Helper.createPoint(0, 1) | ||
| )); | ||
|
|
||
| AreaOccupancyJob testee = new AreaOccupancyJob(jobEntity, Duration.ofSeconds(10), 0.001, 0.1, observationConsumerMock); | ||
| Helper.createPoint(0, 0), | ||
| Helper.createPoint(1, 0), | ||
| Helper.createPoint(1, 1), | ||
| Helper.createPoint(0, 1))); | ||
|
|
||
| AreaOccupancyJob testee = new AreaOccupancyJob(jobEntity, Duration.ofSeconds(10), 0.001, 0.1, | ||
| observationConsumerMock); | ||
|
|
||
| for (SaeMessage msg : saeDump) { | ||
| testee.processNewMessage(SaeMessageDto.from(msg)); | ||
| } | ||
| saeDump.close(); |
There was a problem hiding this comment.
The saeDump resource should be properly closed even if an exception occurs. The close call is currently after the iteration, which means if an exception occurs during the loop, the resource won't be closed. Consider using try-with-resources instead of manual close.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
| .format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) : null); | ||
| @Override | ||
| public ZonedDateTime deserialize(JsonParser jsonParser, DeserializationContext ctxt) { | ||
| return ZonedDateTime.parse(jsonParser.getString()); |
There was a problem hiding this comment.
The deserialize method should handle exceptions that may be thrown by jsonParser.getString(). Consider wrapping this in a try-catch block or declaring the exception in the method signature.
| return ZonedDateTime.parse(jsonParser.getString()); | |
| try { | |
| String value = jsonParser.getString(); | |
| return value != null ? ZonedDateTime.parse(value) : null; | |
| } catch (Exception e) { | |
| throw new RuntimeException("Failed to deserialize ZonedDateTime", e); | |
| } |
| import static org.mockito.Mockito.verify; | ||
|
|
||
| import java.awt.geom.Point2D; | ||
| import java.io.IOException; |
There was a problem hiding this comment.
The imported exception class IOException is declared but never used in this test method. The method signature now declares throws IOException, but the actual operations don't throw this exception - only the saeDump.close() call could potentially throw it, and that's already handled by the method signature.
persistence/src/main/java/de/starwit/persistence/common/serializer/ZonedDateTimeSerializer.java
Outdated
Show resolved
Hide resolved
service/src/main/java/de/starwit/service/geojson/GeoJsonSenderService.java
Outdated
Show resolved
Hide resolved
…Service.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…izer/ZonedDateTimeSerializer.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: witchpou <10485792+witchpou@users.noreply.github.com>
Use try-with-resources for SaeDump in AreaOccupancyJobTest
Description
Motivation and Context
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist: