[英]Spring Boot : Can we use reactive Webfilter in existing spring mvc application?
I am trying to incorporate spring reactive Webflux webfilter to existing spring boot web application and getting below error.我正在尝试将 spring 反应式 Webflux webfilter 合并到现有的 spring boot web 应用程序中,并得到以下错误。
APPLICATION FAILED TO START应用程序无法启动
Description:描述:
The bean 'conversionServicePostProcessor', defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class], could not be registered.无法注册在类路径资源 [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class] 中定义的 bean 'conversionServicePostProcessor'。 A bean with that name has already been defined in class path resource [org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfiguration.class] and overriding is disabled.
具有该名称的 bean 已经在类路径资源 [org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfiguration.class] 中定义并且覆盖被禁用。
question: Can we use reactive Webfilter in existing spring mvc application?问题:我们可以在现有的 spring mvc 应用程序中使用反应式 Webfilter 吗?
Thanks in advance.提前致谢。
No, you can't directly use reactive filters;不,您不能直接使用反应式过滤器; the MVC stack uses the Servlet API, which has its own (blocking) filter mechanism.
MVC 堆栈使用 Servlet API,它有自己的(阻塞)过滤机制。 You might be able to extract the business logic into a common class and reference it from both a reactive and a blocking implementation.
您或许能够将业务逻辑提取到一个公共类中,并从反应式和阻塞式实现中引用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.