Skip to content

Fix #2088: Upgrade to Spring Boot 4 - #2092

Open
michal-rozehnal-w wants to merge 14 commits into
developfrom
issues/2088-Support-Spring-Boot-4
Open

Fix #2088: Upgrade to Spring Boot 4#2092
michal-rozehnal-w wants to merge 14 commits into
developfrom
issues/2088-Support-Spring-Boot-4

Conversation

@michal-rozehnal-w

@michal-rozehnal-w michal-rozehnal-w commented Jun 8, 2026

Copy link
Copy Markdown
Member

Spring Boot upgraded to version 4 - followed migration guide
Jackson upgraded to version 3 - followed migration guide

@michal-rozehnal-w michal-rozehnal-w linked an issue Jun 8, 2026 that may be closed by this pull request
if (ex.getErrorResponse() == null) {
logger.trace("Wultra Java Core lib did not parse ErrorResponse for {}", ex.getResponse());
try {
if (ex.getResponse() == null) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

After the upgrade, rest-client-base now parses the error body, so ex.getErrorResponse() became non-null

/**
* Formatted values.
*/
@JsonSetter(nulls = Nulls.SKIP)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The USE_GETTERS_AS_SETTERS is disabled by default and because deserialization happens in rest-client-base, I added this annotation to each private final collection field. We use the same pattern in other components

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's review other components and apply this pattern.

logger.warn("No response received during REST client call");
return null;
}
ErrorResponse errorResponse = objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).readValue(ex.getResponse(), ErrorResponse.class);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The FAIL_ON_UNKNOWN_PROPERTIES is disabled by default

* @return Enum constant name.
*/
@JsonValue
public String toJsonValue() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The WRITE_ENUMS_USING_TO_STRING is enabled by default, so without this change we would get values serialized in lower case (value returned by toString()) instead of upper case.
Alternatively we can use @JsonProperty as already is in AllowedAuthCodeType class

objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The WRITE_DATES_AS_TIMESTAMPS is also disabled by default

@michal-rozehnal-w
michal-rozehnal-w marked this pull request as ready for review June 8, 2026 07:32

@banterCZ banterCZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's review the final fields with @romanstrobl, please.

Comment thread pom.xml Outdated
Comment thread pom.xml Outdated
Comment thread pom.xml
<powerauth-crypto.version>2.1.0-SNAPSHOT</powerauth-crypto.version>
<powerauth-push.version>2.0.1</powerauth-push.version>
<wultra-core.version>2.2.0-SNAPSHOT</wultra-core.version>
<powerauth.version>2.2.0-SNAPSHOT</powerauth.version>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤔 Won't the customers be confused? We have WebFlow 2.1, but are using PowerAuth server 2.2.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good question. As we discussed, the 2.1 release is not needed, so we can skip it and make the next release 2.2. I can update the version in all modules from 2.1.0-SNAPSHOT to 2.2.0-SNAPSHOT in this PR to avoid any confusion. What do you think?
Additional note: It seems we will move NextStep to separate repo, so the next release could be outside of this one

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤔 What if we release only NextStep 2.1 with Spring Boot 4 from a new repo and keep WebFlow snapshot here? cc @vita-kotacka

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sounds good to me. I'll hold off on merging this PR until we make a final decision.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:hurtrealbad: Decided by the offline discussion:

  1. Fork the webflow
  2. Clean up everything but next-step
  3. Resume the PR.

Overall:

  • Web Flow will stay on the version 2.1.x
  • NextStep will continue from the version 2.2.x

@banterCZ
banterCZ requested a review from romanstrobl June 8, 2026 08:15
@vita-kotacka

Copy link
Copy Markdown
Member

🤖 Optional follow-up (non-blocking): spring-boot-starter-web is deprecated in Spring Boot 4 in favor of spring-boot-starter-webmvc (per the SB4 migration guide). It still works via the compatibility alias, but consider renaming it in the 5 modules that declare it (powerauth-nextstep, powerauth-tpp-engine, powerauth-tpp-engine-client, powerauth-webflow, powerauth-webflow-client) to align with the new modular starters.

@vita-kotacka vita-kotacka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:hurtrealbad: LGTM 👍

Comment thread pom.xml Outdated

@banterCZ banterCZ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suggest moving dependency from the parent to the modules. Otherwise good job!

@romanstrobl romanstrobl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good job, I have several minor comments.

Comment thread CHANGELOG.md Outdated
### Changed

- Upgraded Docker base image to `ibm-semeru-runtimes:open-jdk-25.0.3.0-jre-noble` (OpenJDK 25) [(2090)](https://github.com/wultra/powerauth-webflow/issues/2090)
- Migrated to Spring Boot 4 and Jackson 3 [(2088)](https://github.com/wultra/powerauth-webflow/issues/2088) No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The format of changelog does not seem to correspond to the format in other PowerAuth components.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You are right, but I can see we use 2 different formats across our repos. Let's discuss it in team which one is preferred

@romanstrobl
romanstrobl self-requested a review June 11, 2026 05:55

@romanstrobl romanstrobl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved.

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.

Support Spring Boot 4

4 participants