简体   繁体   中英

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.


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. 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.

question: Can we use reactive Webfilter in existing spring mvc application?

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. You might be able to extract the business logic into a common class and reference it from both a reactive and a blocking implementation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM