Package io.micronaut.http.annotation
Annotation Interface ServerFilter
@Documented
@Retention(RUNTIME)
@Target(TYPE)
@Bean
@DefaultScope(jakarta.inject.Singleton.class)
public @interface ServerFilter
Mark a bean as a filter for the HTTP server. The bean may declare
RequestFilter
s and
ResponseFilter
s.- Since:
- 4.0.0
- Author:
- Jonas Konrad
-
Field Details
-
MATCH_ALL_PATTERN
Pattern used to match all requests.- See Also:
-
-
Element Details
-
value
String[] value- Returns:
- The patterns this filter should match
- Default:
- {}
-
patternStyle
FilterPatternStyle patternStyle- Returns:
- The style of pattern this filter uses
- Default:
- ANT
-
patterns
Same asvalue()
.- Returns:
- The patterns
- Default:
- {}
-
methods
HttpMethod[] methods- Returns:
- The methods to match. Defaults to all
- Default:
- {}
-
appendContextPath
boolean appendContextPath- Returns:
- Whether the contextPath should be concatenated into the filter pattern
- Since:
- 4.5.1
- Default:
- true
-