The problem will be fixed in spring-core 6.2.4 and 6.1.18. Currently published snapshot versions are already addresssing this due to the issue: https://github.com/spring-projects/spring-framework/issues/34514. I have tested it under 6.2.4.SNAPSHOT and it is working as expected. For a workaround on different versions the answer of M. Deinum is solving the issue.