spring-framework / org.springframework.web.servlet.config.annotation / InterceptorRegistration

InterceptorRegistration

open class InterceptorRegistration

Assists with the creation of a MappedInterceptor.

Author
Rossen Stoyanchev

Author
Keith Donald

Since
3.1

Constructors

<init>

InterceptorRegistration(interceptor: HandlerInterceptor)

Creates an InterceptorRegistration instance.

Functions

addPathPatterns

open fun addPathPatterns(vararg patterns: String): InterceptorRegistration

Add URL patterns to which the registered interceptor should apply to.

excludePathPatterns

open fun excludePathPatterns(vararg patterns: String): InterceptorRegistration

Add URL patterns to which the registered interceptor should not apply to.

order

open fun order(order: Int): InterceptorRegistration

Specify an order position to be used. Default is 0.

pathMatcher

open fun pathMatcher(pathMatcher: PathMatcher): InterceptorRegistration

A PathMatcher implementation to use with this interceptor. This is an optional, advanced property required only if using custom PathMatcher implementations that support mapping metadata other than the Ant path patterns supported by default.