he annotation @EnableWebFluxSecurity enables Spring Security support for APIs based on Spring WebFlux.
.pathMatchers("/actuator/**").permitAll() is used to allow unrestricted access to URLs that should be unprotected, for example, the actuator endpoints in this case. Refer to the source code for URLs that are treated as unprotected. Be careful about which URLs are exposed unprotected. For example, the actuator endpoints should be protected before going to production.
.anyExchange().authenticated() ensures that the user is authenticated before being allowed access to all other URLs.
.oauth2ResourceServer().jwt() specifies that authorization will be based on OAuth 2.0 access tokens encoded as JWTs.