Skip to content

817 upgrade to spring boot 40x#818

Open
pwannenmacher wants to merge 68 commits into
mainfrom
817-upgrade-to-spring-boot-40x
Open

817 upgrade to spring boot 40x#818
pwannenmacher wants to merge 68 commits into
mainfrom
817-upgrade-to-spring-boot-40x

Conversation

@pwannenmacher

Copy link
Copy Markdown
Member

No description provided.

@pwannenmacher pwannenmacher self-assigned this Nov 23, 2025
@pwannenmacher pwannenmacher linked an issue Nov 23, 2025 that may be closed by this pull request
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch 5 times, most recently from 94d7558 to b9da9fe Compare December 2, 2025 09:15
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch 2 times, most recently from 21bbbdf to cd13fa4 Compare January 13, 2026 08:29
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch from e59c122 to 07b224e Compare January 31, 2026 19:03
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch from 07b224e to 6bf6332 Compare April 15, 2026 06:59
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch from 6bf6332 to 4c63cf2 Compare April 23, 2026 17:12
@pwannenmacher pwannenmacher requested a review from jnsfZ April 25, 2026 13:26
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch 2 times, most recently from 1263954 to 911048e Compare April 28, 2026 16:26
@pwannenmacher pwannenmacher requested a review from Copilot May 8, 2026 08:59
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch from cada314 to 4e37089 Compare May 8, 2026 09:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 upgrades the project to Spring Boot 4.0.x and updates related dependencies and APIs across the main library, development sample apps, and the integration test suite. It also modernizes parts of the build/test infrastructure (Testcontainers, Maven compiler/processor setup, and a new Docker test build image).

Changes:

  • Upgrade Spring Boot parent to 4.0.5, update key dependencies (springdoc 3.x, spec-arg-resolver 4.x, Sentry starter, Testcontainers artifacts), and adjust imports/APIs for Spring Boot 4.
  • Rework integration tests to use a shared Postgres Testcontainers base (AbstractEssenciumIntegrationTest) and reorganize integration-test “app” packages.
  • Update mail handling to be gated by a new mail.enabled property, and adjust JSON filtering/advice to work with the new Jackson/Spring stack.

Reviewed changes

Copilot reviewed 70 out of 70 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
essencium-backend/src/testIntegration/resources/db/migration/V1_0__init.sql Adds API token tables for integration schema (currently duplicated DDL blocks).
essencium-backend/src/testIntegration/resources/application-test_h2.yml Removes old H2 test profile config.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/util/UserAndSessionModuleTest.java Updates imports/packages and switches to shared Postgres integration base.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/util/TestingUtils.java Updates integration test utilities to new packages/Jackson imports.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/util/RestPageImpl.java Updates JsonNode import for new Jackson package.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/util/EssenciumSchedulerIntegrationTest.java Updates AutoConfigureMockMvc import for Spring Boot 4.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/util/AbstractEssenciumIntegrationTest.java Introduces shared Testcontainers Postgres base class/profile.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/security/UserSecurityTest.java Migrates test to shared Postgres base + Jackson import updates.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/model/NativeIdIntegrationTest.java Removes an integration test tied to old ID/DB assumptions.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/model/AbstractBaseModelIntegrationTest.java Updates packages, base class, and class naming for integration tests.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/IntegrationTestApplication.java Updates EntityScan import for Spring Boot 4.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/UserControllerIntegrationTest.java Migrates test packages/Jackson imports; updates JSONPath assertions.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/TranslationIntegrationTest.java Migrates to shared Postgres base and updates Jackson import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/TokenInvalidationIntegrationTest.java Migrates packages/base class; updates JSONPath assertions and null-safety.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/StaticResourcesAndRedirectionTest.java Migrates to shared Postgres base.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/RoleControllerIntegrationTest.java Migrates to shared Postgres base and updates Jackson import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/ResetCredentialsIntegrationTest.java Migrates to shared Postgres base.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/ContactControllerIntegrationTest.java Migrates to shared Postgres base and updates Jackson import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/AuthenticationControllerIntegrationTest.java Migrates to Postgres profiles, updates Jackson import, keeps WireMock flows.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/AuthCompareTest.java Migrates to shared Postgres base.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/controller/AccessEntityFilteringIntegrationTest.java Expands explicit imports; migrates to shared Postgres base + Jackson import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/configuration/UserTokenInvalidationAspectTest.java Removes local container setup and uses shared Postgres base.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/configuration/TestDefaultInitialization.java Migrates to shared Postgres base.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/service/TestUserService.java Moves test app service into new app.service package.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/service/NativeService.java Moves service into app.service and updates imports.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/service/ForeignService.java Moves service into app.service and updates imports.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/repository/TestSessionTokenRepository.java Moves repository into app.repository.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/repository/TestBaseUserRepository.java Moves repository into app.repository and updates entity import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/repository/specification/NativeSpec.java Moves specification into app.repository.specification.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/repository/NativeRepository.java Moves repository into app.repository and updates entity import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/repository/ForeignTypeRepository.java Moves repository into app.repository and updates entity import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/representation/assenmbler/TestUserAssembler.java Relocates assembler (package name contains a typo).
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/entity/TestUser.java Moves test entity into app.model.entity.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/entity/Native.java Moves entity into app.model.entity and updates controller import.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/entity/Foreign.java Moves entity into app.model.entity.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/dto/TestBaseUserDto.java Moves DTO into app.model.dto.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/dto/NativeDTO.java Moves DTO into app.model.dto.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/controller/TestUserController.java Moves controller into app.controller and updates imports.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/controller/NativeController2.java Moves controller into app.controller and updates imports.
essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/controller/NativeController.java Moves controller into app.controller and updates imports.
essencium-backend/src/test/resources/application-local_test.yaml Updates test config (removes swagger base-url).
essencium-backend/src/test/java/de/frachtwerk/essencium/backend/service/SimpleMailServiceTest.java Updates unit test wiring for new SimpleMailService constructor.
essencium-backend/src/test/java/de/frachtwerk/essencium/backend/service/SessionTokenInvalidationUuidServiceTest.java Updates Spring Data JPA specification types used in verifications.
essencium-backend/src/test/java/de/frachtwerk/essencium/backend/service/SessionTokenInvalidationLongServiceTest.java Updates Spring Data JPA specification types used in verifications.
essencium-backend/src/test/java/de/frachtwerk/essencium/backend/service/JwtTokenServiceTest.java Adjusts JWT regex assertions.
essencium-backend/src/test/java/de/frachtwerk/essencium/backend/security/oauth2/OAuth2SuccessHandlerTest.java Moves test package and switches to stub user service types.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/util/EssenciumScheduler.java Updates Sentry transaction import for Spring Boot 4/Sentry integration.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/service/translation/JsonTranslationFileCreator.java Switches ObjectMapper import and simplifies JSON generation flow.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/service/SimpleMailService.java Gates mail sending behind new mail.enabled property + property-based config access.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/security/JwtAuthenticationProvider.java Updates Jackson imports for new package.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/model/representation/BasicRepresentation.java Replaces record with class + Jackson ordering annotations (but loses value equality).
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/model/dto/EssenciumUserDetails.java Adds @Nonnull annotation for authorities getter.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/controller/advice/RestExceptionHandler.java Updates ErrorAttributes import for Spring Boot 4.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/controller/advice/AccessAwareJsonViewAdvice.java Reimplements response filtering advice for the new Jackson/Spring stack.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/controller/access/ApiTokenEquals.java Switches NonNull annotation type and adds NonNull to CriteriaQuery param.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/controller/access/AccessAwareJsonFilter.java Ports role/right-based JSON filtering to new Jackson PropertyFilter API.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/configuration/StringToUUIDConverter.java Switches NonNull annotation type.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/configuration/properties/MailProperties.java Adds enabled flag to mail configuration properties.
essencium-backend/src/main/java/de/frachtwerk/essencium/backend/configuration/DataNamingConfig.java Adjusts Hibernate physical naming strategy wiring/conditions.
essencium-backend/pom.xml Upgrades Spring Boot + dependencies; updates plugins and Testcontainers artifacts.
essencium-backend-development/src/main/resources/application.yaml Updates Boot 4 config keys (server error props, springdoc toggles).
essencium-backend-development/src/main/resources/application-development.yaml Updates dev profile config keys for Boot 4 + springdoc toggles.
essencium-backend-development/src/main/java/de/frachtwerk/essencium/backend/SpringBootApp.java Updates EntityScan import for Boot 4.
essencium-backend-development/pom.xml Upgrades Spring Boot parent and reformats metadata.
essencium-backend-development-uuid/src/main/resources/application.yaml Updates Boot 4 config keys (server error props, springdoc toggles).
essencium-backend-development-uuid/src/main/resources/application-development.yaml Updates dev profile config keys for Boot 4 + springdoc toggles.
essencium-backend-development-uuid/src/main/java/de/frachtwerk/essencium/backend/SpringBootApp.java Updates EntityScan import for Boot 4.
essencium-backend-development-uuid/pom.xml Upgrades Spring Boot parent and reformats metadata.
Dockerfile-test Adds multi-stage build/test Dockerfile for CI-like test runs and demo runtime image.
CHANGELOG.md Documents Spring Boot 4 upgrade and dependency changes.
Comments suppressed due to low confidence (3)

essencium-backend/src/main/java/de/frachtwerk/essencium/backend/configuration/properties/MailProperties.java:48

  • MailProperties.enabled is introduced without a default, so it will default to false when not configured. That makes SimpleMailService.sendMail(..) a no-op by default (breaking existing setups where mail.* is configured but mail.enabled is not). Consider defaulting enabled to true for backwards compatibility (or documenting and updating all example configs to set it explicitly).
  private static final String SMTP_PROTOCOL = "smtp";

  private boolean enabled;
  private String host;
  private Integer port;
  private String username;
  private String password;

essencium-backend/pom.xml:156

  • spring-boot-starter-webmvc-test is a test-only starter but is currently added without <scope>test</scope>, which will pull test infrastructure into the main artifact/runtime classpath. Set its scope to test (or remove it if spring-boot-starter-test already provides the needed pieces).

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>

essencium-backend/src/testIntegration/java/de/frachtwerk/essencium/backend/test/integration/app/model/representation/assenmbler/TestUserAssembler.java:23

  • Package/directory name assenmbler looks like a typo (should be assembler) and is inconsistent with the rest of the codebase (e.g. de.frachtwerk.essencium.backend.model.representation.assembler). Consider renaming the package/folder to avoid long-term confusion and mismatched imports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread essencium-backend/src/testIntegration/resources/db/migration/V1_0__init.sql Outdated
Comment thread essencium-backend/src/testIntegration/resources/db/migration/V1_0__init.sql Outdated
Comment thread Dockerfile-test Outdated
Comment thread Dockerfile-test Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 71 out of 71 changed files in this pull request and generated 8 comments.

Comment thread essencium-backend/pom.xml
Comment thread essencium-backend/pom.xml Outdated
Comment thread CHANGELOG.md Outdated
Comment thread MIGRATION.md Outdated
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch 2 times, most recently from 4bff0fa to b66ca4b Compare May 8, 2026 13:57
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch from fc946ad to d69b5a0 Compare May 21, 2026 16:40
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch 2 times, most recently from e8e6bc4 to b25083e Compare May 29, 2026 15:53
@pwannenmacher pwannenmacher force-pushed the 817-upgrade-to-spring-boot-40x branch from 3adf34a to 3f097a2 Compare June 11, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Spring Boot 4.0.x

3 participants