2828
2929/**
3030 * Defines callback methods to customize the configuration for WebFlux
31- * applications enabled via {@code @EnableWebFlux}.
31+ * applications enabled via {@link EnableWebFlux @EnableWebFlux}.
3232 *
3333 * <p>{@code @EnableWebFlux}-annotated configuration classes may implement
3434 * this interface to be called back and given a chance to customize the
3838 * @author Brian Clozel
3939 * @author Rossen Stoyanchev
4040 * @since 5.0
41+ * @see WebFluxConfigurationSupport
42+ * @see DelegatingWebFluxConfiguration
4143 */
4244public interface WebFluxConfigurer {
4345
4446 /**
45- * Configure how the content type requested for the response is resolved.
47+ * Configure how the content type requested for the response is resolved
48+ * when handling reqests with annotated controllers.
4649 * @param builder for configuring the resolvers to use
4750 */
4851 default void configureContentTypeResolver (RequestedContentTypeResolverBuilder builder ) {
4952 }
5053
5154 /**
52- * Configure cross origin requests processing.
55+ * Configure "global" cross origin request processing.
56+ * <p>The configured readers and writers will apply to all requests including
57+ * annotated controllers and functional endpoints. Annotated controllers can
58+ * further declare more fine-grained configuration via
59+ * {@link org.springframework.web.bind.annotation.CrossOrigin @CrossOrigin}.
5360 * @see CorsRegistry
5461 */
5562 default void addCorsMappings (CorsRegistry registry ) {
5663 }
5764
5865 /**
5966 * Configure path matching options.
60- *
61- * {@code HandlerMapping}s with path matching options.
67+ * <p>The configured path matching options will be used for mapping to
68+ * annotated controllers and also
69+ * {@link #addResourceHandlers(ResourceHandlerRegistry) static resources}.
6270 * @param configurer the {@link PathMatchConfigurer} instance
6371 */
6472 default void configurePathMatching (PathMatchConfigurer configurer ) {
@@ -72,22 +80,24 @@ default void addResourceHandlers(ResourceHandlerRegistry registry) {
7280 }
7381
7482 /**
75- * Configure resolvers for custom controller method arguments.
83+ * Configure resolvers for custom {@code @RequestMapping} method arguments.
7684 * @param configurer to configurer to use
7785 */
7886 default void configureArgumentResolvers (ArgumentResolverConfigurer configurer ) {
7987 }
8088
8189 /**
8290 * Configure custom HTTP message readers and writers or override built-in ones.
91+ * <p>The configured readers and writers will be used for both annotated
92+ * controllers and functional endpoints.
8393 * @param configurer the configurer to use
8494 */
8595 default void configureHttpMessageCodecs (ServerCodecConfigurer configurer ) {
8696 }
8797
8898 /**
8999 * Add custom {@link Converter}s and {@link Formatter}s for performing type
90- * conversion and formatting of controller method arguments.
100+ * conversion and formatting of annotated controller method arguments.
91101 */
92102 default void addFormatters (FormatterRegistry registry ) {
93103 }
@@ -96,30 +106,30 @@ default void addFormatters(FormatterRegistry registry) {
96106 * Provide a custom {@link Validator}.
97107 * <p>By default a validator for standard bean validation is created if
98108 * bean validation api is present on the classpath.
109+ * <p>The configured validator is used for validating annotated controller
110+ * method arguments.
99111 */
100112 @ Nullable
101113 default Validator getValidator () {
102114 return null ;
103115 }
104116
105117 /**
106- * Provide a custom {@link MessageCodesResolver} to use for data binding instead
107- * of the one created by default in {@link org.springframework.validation.DataBinder}.
118+ * Provide a custom {@link MessageCodesResolver} to use for data binding in
119+ * annotated controller method arguments instead of the one created by
120+ * default in {@link org.springframework.validation.DataBinder}.
108121 */
109122 @ Nullable
110123 default MessageCodesResolver getMessageCodesResolver () {
111124 return null ;
112125 }
113126
114127 /**
115- * Configure view resolution for processing the return values of controller
116- * methods that rely on resolving a
117- * {@link org.springframework.web.reactive.result.view.View} to render
118- * the response with. By default all controller methods rely on view
119- * resolution unless annotated with {@code @ResponseBody} or explicitly
120- * return {@code ResponseEntity}. A view may be specified explicitly with
121- * a String return value or implicitly, e.g. {@code void} return value.
122- * @see ViewResolverRegistry
128+ * Configure view resolution for rendering responses with a view and a model,
129+ * where the view is typically an HTML template but could also be based on
130+ * an HTTP message writer (e.g. JSON, XML).
131+ * <p>The configured view resolvers will be used for both annotated
132+ * controllers and functional endpoints.
123133 */
124134 default void configureViewResolvers (ViewResolverRegistry registry ) {
125135 }
0 commit comments