What is the difference between @EnableWebSecurity and @EnableWebFluxSecurity?

Viewed 1481

What is the difference between @EnableWebSecurity and @EnableWebFluxSecurity from the context of security?

I am trying to use a Spring Cloud Gateway which supports few reactive Micro-services in the downstream. And few normal web services as well. And wanted to user @EnableWebSecuirty in the API Gateway. So will that work with reactive Services as well?

1 Answers

They both have same security semantics, but @EnableWebSecurity is used in a MVC stack whereas @EnableWebFluxSecurity is used in the reactive stack (enabling Spring Security WebFlux).

Related