spring-projects / spring-projects/spring-security
For Reference documentation: How works @PreAuthorize in class and method level
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Hello
I did a research in the Spring Security Reference documentation. And about @PreAuthorize it only appears in method declaration. Ok, but if we check either the source code or javadoc, we can see it can be applied or declared to type (class/interface) declaration
Thus, in the reference documentation should indicate how @PreAuthorize works when is declared in class and method level, the latter complements the former? or the latter overrides by complete the former.
Check this post from SO, the answer and the comment from that answer.
Is it possible to add @Secured or @PreAuthorized annotations on an entire class
Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Spring Security Reference documentation sections covering @PreAuthorize, then compare them with the annotation's source code or Javadoc. Use the linked Stack Overflow discussion as supporting context and document how class-level and method-level declarations interact, including whether the method-level rule complements or overrides the class-level rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100