45
45
*/
46
46
public interface WebFluxConfigurer {
47
47
48
- /**
49
- * Configure how the content type requested for the response is resolved
50
- * when handling requests with annotated controllers.
51
- * @param builder for configuring the resolvers to use
52
- */
53
- default void configureContentTypeResolver (RequestedContentTypeResolverBuilder builder ) {
54
- }
55
-
56
- /**
57
- * Configure "global" cross-origin request processing. The configured CORS
58
- * mappings apply to annotated controllers, functional endpoints, and static
59
- * resources.
60
- * <p>Annotated controllers can further declare more fine-grained config via
61
- * {@link org.springframework.web.bind.annotation.CrossOrigin @CrossOrigin}.
62
- * In such cases "global" CORS configuration declared here is
63
- * {@link org.springframework.web.cors.CorsConfiguration#combine(CorsConfiguration) combined}
64
- * with local CORS configuration defined on a controller method.
65
- * @see CorsRegistry
66
- * @see CorsConfiguration#combine(CorsConfiguration)
67
- */
68
- default void addCorsMappings (CorsRegistry registry ) {
69
- }
70
-
71
- /**
72
- * Configure path matching options.
73
- * <p>The configured path matching options will be used for mapping to
74
- * annotated controllers and also
75
- * {@link #addResourceHandlers(ResourceHandlerRegistry) static resources}.
76
- * @param configurer the {@link PathMatchConfigurer} instance
77
- */
78
- default void configurePathMatching (PathMatchConfigurer configurer ) {
79
- }
80
-
81
- /**
82
- * Add resource handlers for serving static resources.
83
- * @see ResourceHandlerRegistry
84
- */
85
- default void addResourceHandlers (ResourceHandlerRegistry registry ) {
86
- }
87
-
88
- /**
89
- * Configure resolvers for custom {@code @RequestMapping} method arguments.
90
- * @param configurer to configurer to use
91
- */
92
- default void configureArgumentResolvers (ArgumentResolverConfigurer configurer ) {
93
- }
94
-
95
48
/**
96
49
* Configure the HTTP message readers and writers for reading from the
97
50
* request body and for writing to the response body in annotated controllers
@@ -134,15 +87,50 @@ default MessageCodesResolver getMessageCodesResolver() {
134
87
}
135
88
136
89
/**
137
- * Provide the {@link WebSocketService} to create
138
- * {@link org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter}
139
- * with. This can be used to configure server-specific properties through the
140
- * {@link org.springframework.web.reactive.socket.server.RequestUpgradeStrategy}.
141
- * @since 5.3
90
+ * Configure "global" cross-origin request processing. The configured CORS
91
+ * mappings apply to annotated controllers, functional endpoints, and static
92
+ * resources.
93
+ * <p>Annotated controllers can further declare more fine-grained config via
94
+ * {@link org.springframework.web.bind.annotation.CrossOrigin @CrossOrigin}.
95
+ * In such cases "global" CORS configuration declared here is
96
+ * {@link org.springframework.web.cors.CorsConfiguration#combine(CorsConfiguration) combined}
97
+ * with local CORS configuration defined on a controller method.
98
+ * @see CorsRegistry
99
+ * @see CorsConfiguration#combine(CorsConfiguration)
142
100
*/
143
- @ Nullable
144
- default WebSocketService getWebSocketService () {
145
- return null ;
101
+ default void addCorsMappings (CorsRegistry registry ) {
102
+ }
103
+
104
+ /**
105
+ * Configure settings related to blocking execution in WebFlux.
106
+ * @since 6.1
107
+ */
108
+ default void configureBlockingExecution (BlockingExecutionConfigurer configurer ) {
109
+ }
110
+
111
+ /**
112
+ * Configure how the content type requested for the response is resolved
113
+ * when handling requests with annotated controllers.
114
+ * @param builder for configuring the resolvers to use
115
+ */
116
+ default void configureContentTypeResolver (RequestedContentTypeResolverBuilder builder ) {
117
+ }
118
+
119
+ /**
120
+ * Configure path matching options.
121
+ * <p>The configured path matching options will be used for mapping to
122
+ * annotated controllers and also
123
+ * {@link #addResourceHandlers(ResourceHandlerRegistry) static resources}.
124
+ * @param configurer the {@link PathMatchConfigurer} instance
125
+ */
126
+ default void configurePathMatching (PathMatchConfigurer configurer ) {
127
+ }
128
+
129
+ /**
130
+ * Configure resolvers for custom {@code @RequestMapping} method arguments.
131
+ * @param configurer to configurer to use
132
+ */
133
+ default void configureArgumentResolvers (ArgumentResolverConfigurer configurer ) {
146
134
}
147
135
148
136
/**
@@ -156,10 +144,22 @@ default void configureViewResolvers(ViewResolverRegistry registry) {
156
144
}
157
145
158
146
/**
159
- * Configure settings related to blocking execution in WebFlux .
160
- * @since 6.1
147
+ * Add resource handlers for serving static resources .
148
+ * @see ResourceHandlerRegistry
161
149
*/
162
- default void configureBlockingExecution (BlockingExecutionConfigurer configurer ) {
150
+ default void addResourceHandlers (ResourceHandlerRegistry registry ) {
151
+ }
152
+
153
+ /**
154
+ * Provide the {@link WebSocketService} to create
155
+ * {@link org.springframework.web.reactive.socket.server.support.WebSocketHandlerAdapter}
156
+ * with. This can be used to configure server-specific properties through the
157
+ * {@link org.springframework.web.reactive.socket.server.RequestUpgradeStrategy}.
158
+ * @since 5.3
159
+ */
160
+ @ Nullable
161
+ default WebSocketService getWebSocketService () {
162
+ return null ;
163
163
}
164
164
165
165
}
0 commit comments