Closed
Description
Nicolas Labrot opened SPR-13468 and commented
Given this composed annotation:
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RequestMapping
@CrossOrigin
@ResponseBody
public @interface CorsRequestMapping {
String[] path() default {};
String[] origins() default {};
RequestMethod[] method() default {};
}
The resulting @CrossOrigin
"origins" attribute is not merged. Issue seems to come from RequestMappingHandlerMapping#initCorsConfiguration
which does not use AnnotatedElementUtils.findMergedAnnotation(*, CrossOrigin.class);
.
Affects: 4.2 GA
Issue Links:
- Introduce predefined composed annotations in core Spring [SPR-13442] #18022 Introduce predefined composed annotations in core Spring
- Use AnnotatedElementUtils instead of AnnotationUtils wherever feasible [SPR-13440] #18020 Use AnnotatedElementUtils instead of AnnotationUtils wherever feasible
- Support @ResponseStatus as a merged composed annotation [SPR-13441] #18021 Support
@ResponseStatus
as a merged composed annotation - Support @Cache* as merged composed annotations [SPR-13475] #18054 Support
@Cache
* as merged composed annotations
Referenced from: commits e4c0859, 0ad59dd
0 votes, 5 watchers