Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Sep 16, 2015 · 2 comments
Closed
Assignees
Labels
in: web type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 16, 2015

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:

  • #18022 Introduce predefined composed annotations in core Spring
  • #18020 Use AnnotatedElementUtils instead of AnnotationUtils wherever feasible
  • #18021 Support @ResponseStatus as a merged composed annotation
  • #18054 Support @Cache* as merged composed annotations

Referenced from: commits e4c0859, 0ad59dd

0 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 20, 2015

Nicolas Labrot commented

I have submitted a PR for this issue:
#877

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 22, 2015

Sam Brannen commented

Completed in GitHub commit 0ad59dd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants