@ -45,53 +45,6 @@ import org.springframework.web.reactive.socket.server.WebSocketService;
@@ -45,53 +45,6 @@ import org.springframework.web.reactive.socket.server.WebSocketService;
* /
public interface WebFluxConfigurer {
/ * *
* Configure how the content type requested for the response is resolved
* when handling requests with annotated controllers .
* @param builder for configuring the resolvers to use
* /
default void configureContentTypeResolver ( RequestedContentTypeResolverBuilder builder ) {
}
/ * *
* Configure "global" cross - origin request processing . The configured CORS
* mappings apply to annotated controllers , functional endpoints , and static
* resources .
* < p > Annotated controllers can further declare more fine - grained config via
* { @link org . springframework . web . bind . annotation . CrossOrigin @CrossOrigin } .
* In such cases "global" CORS configuration declared here is
* { @link org . springframework . web . cors . CorsConfiguration # combine ( CorsConfiguration ) combined }
* with local CORS configuration defined on a controller method .
* @see CorsRegistry
* @see CorsConfiguration # combine ( CorsConfiguration )
* /
default void addCorsMappings ( CorsRegistry registry ) {
}
/ * *
* Configure path matching options .
* < p > The configured path matching options will be used for mapping to
* annotated controllers and also
* { @link # addResourceHandlers ( ResourceHandlerRegistry ) static resources } .
* @param configurer the { @link PathMatchConfigurer } instance
* /
default void configurePathMatching ( PathMatchConfigurer configurer ) {
}
/ * *
* Add resource handlers for serving static resources .
* @see ResourceHandlerRegistry
* /
default void addResourceHandlers ( ResourceHandlerRegistry registry ) {
}
/ * *
* Configure resolvers for custom { @code @RequestMapping } method arguments .
* @param configurer to configurer to use
* /
default void configureArgumentResolvers ( ArgumentResolverConfigurer configurer ) {
}
/ * *
* Configure the HTTP message readers and writers for reading from the
* request body and for writing to the response body in annotated controllers
@ -134,15 +87,50 @@ public interface WebFluxConfigurer {
@@ -134,15 +87,50 @@ public interface WebFluxConfigurer {
}
/ * *
* Provide the { @link WebSocketService } to create
* { @link org . springframework . web . reactive . socket . server . support . WebSocketHandlerAdapter }
* with . This can be used to configure server - specific properties through the
* { @link org . springframework . web . reactive . socket . server . RequestUpgradeStrategy } .
* @since 5 . 3
* Configure "global" cross - origin request processing . The configured CORS
* mappings apply to annotated controllers , functional endpoints , and static
* resources .
* < p > Annotated controllers can further declare more fine - grained config via
* { @link org . springframework . web . bind . annotation . CrossOrigin @CrossOrigin } .
* In such cases "global" CORS configuration declared here is
* { @link org . springframework . web . cors . CorsConfiguration # combine ( CorsConfiguration ) combined }
* with local CORS configuration defined on a controller method .
* @see CorsRegistry
* @see CorsConfiguration # combine ( CorsConfiguration )
* /
@Nullable
default WebSocketService getWebSocketService ( ) {
return null ;
default void addCorsMappings ( CorsRegistry registry ) {
}
/ * *
* Configure settings related to blocking execution in WebFlux .
* @since 6 . 1
* /
default void configureBlockingExecution ( BlockingExecutionConfigurer configurer ) {
}
/ * *
* Configure how the content type requested for the response is resolved
* when handling requests with annotated controllers .
* @param builder for configuring the resolvers to use
* /
default void configureContentTypeResolver ( RequestedContentTypeResolverBuilder builder ) {
}
/ * *
* Configure path matching options .
* < p > The configured path matching options will be used for mapping to
* annotated controllers and also
* { @link # addResourceHandlers ( ResourceHandlerRegistry ) static resources } .
* @param configurer the { @link PathMatchConfigurer } instance
* /
default void configurePathMatching ( PathMatchConfigurer configurer ) {
}
/ * *
* Configure resolvers for custom { @code @RequestMapping } method arguments .
* @param configurer to configurer to use
* /
default void configureArgumentResolvers ( ArgumentResolverConfigurer configurer ) {
}
/ * *
@ -156,10 +144,22 @@ public interface WebFluxConfigurer {
@@ -156,10 +144,22 @@ public interface WebFluxConfigurer {
}
/ * *
* Configure settings related to blocking execution in WebFlux .
* @since 6 . 1
* Add resource handlers for serving static resources .
* @see ResourceHandlerRegistry
* /
default void configureBlockingExecution ( BlockingExecutionConfigurer configurer ) {
default void addResourceHandlers ( ResourceHandlerRegistry registry ) {
}
/ * *
* Provide the { @link WebSocketService } to create
* { @link org . springframework . web . reactive . socket . server . support . WebSocketHandlerAdapter }
* with . This can be used to configure server - specific properties through the
* { @link org . springframework . web . reactive . socket . server . RequestUpgradeStrategy } .
* @since 5 . 3
* /
@Nullable
default WebSocketService getWebSocketService ( ) {
return null ;
}
}