问题描述
我无法使本机图像正常工作。我有我的自定义反应式身份验证管理器,当我使用 mvn spring-boot:run 运行服务时一切正常。但是当我使用本机映像创建容器并运行它时,出现以下错误:
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]
我找不到任何与此相关的示例。有人可以帮忙吗?
在此先非常感谢您。 最好的问候。
解决方法
嗯,这是我犯的一个愚蠢的错误,我已经意识到了,因为我在 IntelliJ IDEA 中运行时遇到了同样的错误。对不起。结束问题。