problem-spring-web icon indicating copy to clipboard operation
problem-spring-web copied to clipboard

Spring Boot 3 support

Open sanyarnd opened this issue 3 years ago • 3 comments

Hi everything is working as expected, except these 3 imports: SB3 has migrated to jakarta namespace.

https://github.com/zalando/problem-spring-web/blob/0f62aa09f64a9cf69e46171542808e3d4c2a7a09/problem-spring-web/src/main/java/org/zalando/problem/spring/web/advice/security/SecurityProblemSupport.java#L15-L17

sanyarnd avatar Apr 02 '22 00:04 sanyarnd

jakarta namespace

What does that mean exactly?

whiskeysierra avatar May 25 '22 15:05 whiskeysierra

https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0

Check if Third-party Projects Have Jakarta EE 9 Compatible Releases

Jakarta EE 9 a new top-level jakarta package, replacing EE 8’s javax top-level package. For example, the Servlet specification in Jakarta EE 8 uses a javax.servlet package but this has changed to jakarta.servlet in EE 9.

Generally speaking, it’s not possible to mix Java EE and Jakarta EE APIs in the same project. You need to ensure that your own code, as well as all third-party libraries are using jakarta.* package imports.

sanyarnd avatar May 25 '22 16:05 sanyarnd

I've been playing around with fixing spring boot 3x support here: https://github.com/zalando/problem-spring-web/compare/main...norrs:problem-spring-web:springboot-3x - but currently have issues with ResponseStatusAdviceTraitTest (webflux) returning non-detailed exceptions. Ie it returns Failed to read HTTP message instead of string containing java.math.BigDecimal on ReponseStatusAdviceTraitTest.invalidFormat() . I suspect it could be related to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.3-Release-Notes#changes-to-the-default-error-pages-content , but that's odd again since current main branch works with spring boot 2.6.4.

I also noticed it looks like spring framework 6.x (which is used by spring-boot 3.x) will come with batteries included according to https://github.com/spring-projects/spring-framework/issues/27052 . Might have a peak and see how easy it is to replace it with how upstream plans to use "problem-json".

norrs avatar Aug 16 '22 17:08 norrs

Spring Web API changed in 6 see https://github.com/zalando/problem-spring-web/issues/792, so this would also have to be adapted.

PascalSchumacher avatar Nov 29 '22 12:11 PascalSchumacher

I will probably open a PR today.

https://github.com/cemo/problem-spring-web/tree/upgrade-spring6

cemo avatar Dec 21 '22 10:12 cemo

I opened a PR https://github.com/zalando/problem-spring-web/pull/826.

cemo avatar Dec 21 '22 13:12 cemo