exceptionHandling

fun exceptionHandling(exceptionHandlingConfiguration: ServerExceptionHandlingDsl.() -> Unit)

Allows configuring exception handling.

Example:

@Configuration
@EnableWebFluxSecurity
class SecurityConfig {

@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
exceptionHandling {
authenticationEntryPoint = RedirectServerAuthenticationEntryPoint("/auth")
}
}
}
}

Parameters

exceptionHandlingConfiguration

custom configuration to apply to exception handling

See also