Fix #2088: Upgrade to Spring Boot 4 - #2092
Conversation
| if (ex.getErrorResponse() == null) { | ||
| logger.trace("Wultra Java Core lib did not parse ErrorResponse for {}", ex.getResponse()); | ||
| try { | ||
| if (ex.getResponse() == null) { |
There was a problem hiding this comment.
After the upgrade, rest-client-base now parses the error body, so ex.getErrorResponse() became non-null
| /** | ||
| * Formatted values. | ||
| */ | ||
| @JsonSetter(nulls = Nulls.SKIP) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
The FAIL_ON_UNKNOWN_PROPERTIES is disabled by default
| * @return Enum constant name. | ||
| */ | ||
| @JsonValue | ||
| public String toJsonValue() { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
The WRITE_DATES_AS_TIMESTAMPS is also disabled by default
banterCZ
left a comment
There was a problem hiding this comment.
Let's review the final fields with @romanstrobl, please.
| <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> |
There was a problem hiding this comment.
🤔 Won't the customers be confused? We have WebFlow 2.1, but are using PowerAuth server 2.2.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
🤔 What if we release only NextStep 2.1 with Spring Boot 4 from a new repo and keep WebFlow snapshot here? cc @vita-kotacka
There was a problem hiding this comment.
Sounds good to me. I'll hold off on merging this PR until we make a final decision.
There was a problem hiding this comment.
Decided by the offline discussion:
- Fork the
webflow - Clean up everything but
next-step - Resume the PR.
Overall:
- Web Flow will stay on the version
2.1.x - NextStep will continue from the version
2.2.x
|
🤖 Optional follow-up (non-blocking): |
banterCZ
left a comment
There was a problem hiding this comment.
I suggest moving dependency from the parent to the modules. Otherwise good job!
romanstrobl
left a comment
There was a problem hiding this comment.
Good job, I have several minor comments.
| ### 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 |
There was a problem hiding this comment.
The format of changelog does not seem to correspond to the format in other PowerAuth components.
There was a problem hiding this comment.
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
Spring Boot upgraded to version 4 - followed migration guide
Jackson upgraded to version 3 - followed migration guide