Skip to content

Support @CrossOrigin as a merged composed annotation [SPR-13468] #18047

Closed

Description

@spring-projects-issues

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:

Referenced from: commits e4c0859, 0ad59dd

0 votes, 5 watchers

Activity

  1. spring-projects-issues commented on Sep 20, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Nicolas Labrot commented

    I have submitted a PR for this issue:
    #877

  2. spring-projects-issues commented on Sep 22, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Completed in GitHub commit 0ad59dd.

  3. added
    type: enhancement
    in: web
    on Jan 11, 2019
  4. added this to the 4.2.2 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions