Latest Spring Boot 3.2.1 seemingly breaks native image compilation, when combining starter-web + starter-security.
When bootstrapping the native application we get:
'The bean 'mvcHandlerMappingIntrospectorRequestTransformer' could not be registered. A bean with that name has already been defined and overriding is disabled.'
Pleaese see an example attached, which generated by start.spring.io and selecting - web + security + native image support
Error can be reproduced by ./gradlew clean nativeCompile or by Paketo build. The
As a sidenode: Boot 3.2.1 also brings in a hibernate version with breaking interfaces changes for CurrentTenantIdentifierResolver, MultiTenantConnectionProvider which now need to be defined with Generic Types
Comment From: bclozel
Thanks for reaching out. This has been reported already in Spring Security.
spring-projects/spring-security#14362
Comment From: waileong
Please consider pinning this issue on top, as this is a blocker for the Native Image project to upgrade to Spring Boot 3.2.1.
Comment From: hoangphuc2k
I upgrade to spring boot 3.2.2 but the issue is still there
Comment From: wilkinsona
@hoangphuc2k That's to be expected. Please see the underlying Spring Security issue for details of when the fix will be released.
Comment From: hoangphuc2k
@wilkinsona Sorry, My mistake I read the post but I mistakenly changed from February to January