简体   繁体   English

Spring Boot:我们可以在现有的 spring mvc 应用程序中使用反应式 Webfilter 吗?

[英]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.

相关问题 我们可以在单个spring boot应用程序中使用多个yaml文件吗? - Can we use multiple yaml files in a single spring boot application? 我们可以在一个项目中同时使用 Java Spring mvc 和 Spring Boot 吗? - Can we use Java Spring mvc and Spring Boot at the same time in a project? 我可以在 spring webfilter 中使用通配符作为路径变量吗? - Can i use wildcard for path variable in spring webfilter? 如何在现有 springboot 应用程序中使用 spring boot 应用程序作为依赖项 - How to use spring boot application as dependency in existing springboot application 使用 ElasticSearch Reactive Streams 的 Spring Boot 应用程序架构 - Architecture of a Spring Boot Application with ElasticSearch Reactive Streams 在 spring mvc 应用程序中运行 spring 启动应用程序 - run spring boot application in spring mvc application @RestControllerAdvice 在 Spring Boot 反应式 Java 应用程序中不起作用 - @RestControllerAdvice not working in Spring Boot reactive java application 在 Spring Boot 应用程序中实现 Reactive Kafka Listener - Implement Reactive Kafka Listener in Spring Boot application 将Spring Boot与现有的Spring应用程序集成 - Integrate Spring Boot with existing Spring application 将现有的Spring应用程序转换为Spring-Boot - Convert existing Spring application to Spring-Boot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM