I am not able to make the native image work. I have my custom Reactive Authentication Manager and everything works fine when I run the service with mvn spring-boot:run. But when I create the container with the native image, and I run it, I get the following error:
webflux-netty_1 | java.lang.IllegalStateException: No provider found for class com.example.webflux.security.JwtAuthenticationToken
webflux-netty_1 | at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:123) ~[na:na]
webflux-netty_1 | Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
webflux-netty_1 | Error has been observed at the following site(s):
webflux-netty_1 | |_ checkpoint ? org.springframework.security.web.server.authentication.AuthenticationWebFilter [DefaultWebFilterChain]
webflux-netty_1 | |_ checkpoint ? org.springframework.security.web.server.context.ReactorContextWebFilter [DefaultWebFilterChain]
I cannot find any example with this. Could anyone help please?
Thank you very much in advance. Best regards.
Well, this was a stupid mistake I did, I have realised about it cause I got the same error running in from IntelliJ IDEA. Sorry for that. Closing the question.