接口的使用
org.springframework.web.cors.reactive.CorsConfigurationSource
使用CorsConfigurationSource的程序包 程序包 说明 org.springframework.web.cors.reactive Reactive support for CORS (Cross-Origin Resource Sharing), based on a commonCorsProcessor
strategy.org.springframework.web.reactive.handler Provides HandlerMapping implementations including abstract base classes.org.springframework.web.cors.reactive中CorsConfigurationSource的使用
实现CorsConfigurationSource的org.springframework.web.cors.reactive中的类 修饰符和类型 类 说明 class
UrlBasedCorsConfigurationSource
Provide a per reactive requestCorsConfiguration
instance based on a collection ofCorsConfiguration
mapped on path patterns.参数类型为CorsConfigurationSource的org.springframework.web.cors.reactive中的构造器 构造器 说明 CorsWebFilter(CorsConfigurationSource configSource)
Constructor accepting aCorsConfigurationSource
used by the filter to find theCorsConfiguration
to use for each incoming request.CorsWebFilter(CorsConfigurationSource configSource, CorsProcessor processor)
Constructor accepting aCorsConfigurationSource
used by the filter to find theCorsConfiguration
to use for each incoming request and a customCorsProcessor
to use to apply the matchedCorsConfiguration
for a request.org.springframework.web.reactive.handler中CorsConfigurationSource的使用
参数类型为CorsConfigurationSource的org.springframework.web.reactive.handler中的方法 修饰符和类型 方法 说明 void
AbstractHandlerMapping. setCorsConfigurationSource(CorsConfigurationSource corsConfigurationSource)
Set the "global" CORS configuration source.