类 CorsRegistry
- java.lang.Object
- org.springframework.web.reactive.config.CorsRegistry
public class CorsRegistry extends Object
Assists with the registration of global, URL pattern basedCorsConfiguration
mappings.- 从以下版本开始:
- 5.0
- 作者:
- Sebastien Deleuze, Rossen Stoyanchev
构造器概要
构造器 构造器 说明 CorsRegistry()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CorsRegistration
addMapping(String pathPattern)
Enable cross-origin request handling for the specified path pattern.protected Map<String,CorsConfiguration>
getCorsConfigurations()
Return the registeredCorsConfiguration
objects, keyed by path pattern.
构造器详细资料
CorsRegistry
public CorsRegistry()
方法详细资料
addMapping
public CorsRegistration addMapping(String pathPattern)
Enable cross-origin request handling for the specified path pattern.Exact path mapping URIs (such as
"/admin"
) are supported as well as Ant-style path patterns (such as"/admin/**"
).By default, the
CorsConfiguration
for this mapping is initialized with default values as described inCorsConfiguration.applyPermitDefaultValues()
.
getCorsConfigurations
protected Map<String,CorsConfiguration> getCorsConfigurations()
Return the registeredCorsConfiguration
objects, keyed by path pattern.