Skip to content

Feature/ab#2020 update to spring boot 4#101

Merged
witchpou merged 20 commits intomainfrom
feature/ab#2020-update-to-spring-boot-4
Jan 6, 2026
Merged

Feature/ab#2020 update to spring boot 4#101
witchpou merged 20 commits intomainfrom
feature/ab#2020-update-to-spring-boot-4

Conversation

@witchpou
Copy link
Collaborator

@witchpou witchpou commented Jan 5, 2026

Description

  • Redis Listener needed to berefactored
  • Github actions are refactored

Motivation and Context

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

dependabot bot and others added 12 commits December 19, 2025 14:16
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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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..jackson to tools.jackson packages
  • 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.

Comment on lines +83 to +100
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();
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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());
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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);
}

Copilot uses AI. Check for mistakes.
import static org.mockito.Mockito.verify;

import java.awt.geom.Point2D;
import java.io.IOException;
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
witchpou and others added 3 commits January 6, 2026 14:49
…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>
Copy link
Contributor

Copilot AI commented Jan 6, 2026

@witchpou I've opened a new pull request, #102, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: witchpou <10485792+witchpou@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Jan 6, 2026

@witchpou I've opened a new pull request, #103, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Jan 6, 2026

@witchpou I've opened a new pull request, #104, to work on those changes. Once the pull request is ready, I'll request review from you.

Use try-with-resources for SaeDump in AreaOccupancyJobTest
@witchpou witchpou merged commit b03d362 into main Jan 6, 2026
2 checks passed
@witchpou witchpou deleted the feature/ab#2020-update-to-spring-boot-4 branch January 6, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants