Polish CORS global configuration
This commit introduces the following changes: - configureCors(CorsConfigurer configurer) is renamed to addCorsMappings(CorsRegistry registry) - enableCors(String... pathPatterns) is renamed to addMapping(String pathPattern) - <cors /> element must have at least one <mapping /> child element in order to be consistent with XML based configuration and have more explicit configuration Issues: SPR-12933, SPR-13046
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<!-- <mvc:cors /> element before <mvc:annotation-driven /> one -->
|
||||
<mvc:cors />
|
||||
<mvc:cors>
|
||||
<mvc:mapping path="/**" />
|
||||
</mvc:cors>
|
||||
|
||||
<mvc:annotation-driven />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user