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

Remove Autowire annotation on the unique constructor in ReactiveAuthorizationManagerMethodSecurityConfiguration #16326

Closed
wants to merge 1 commit into from

Conversation

kse-music
Copy link
Contributor

@kse-music kse-music commented Dec 22, 2024

Closes gh-16325

There is a methodSecurityExpressionHandler bean with @fallback in the ReactiveAuthorizationManagerMethodSecurityConfiguration.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 22, 2024
@kse-music kse-music changed the title Remove Autowire annotation on the unique constructor Remove Autowire annotation on the unique constructor in ReactiveAuthorizationManagerMethodSecurityConfiguration Dec 23, 2024
@rwinch
Copy link
Member

rwinch commented Jan 7, 2025

Thanks for the PR! This is a breaking change because currently expressionHandler is optional, but by removing @Autowired(required = false) it is now required.

I'm going to close this issue for the reason described above.

@rwinch rwinch closed this Jan 7, 2025
@rwinch rwinch self-assigned this Jan 7, 2025
@rwinch rwinch added status: invalid An issue that we don't feel is valid in: config An issue in spring-security-config and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 7, 2025
@kse-music
Copy link
Contributor Author

@rwinch

First of all, the @Autowired(required = false) annotation on the constructor does not indicate that expressionHandler is optional unless it is annotated on the parameter.

ReactiveAuthorizationManagerMethodSecurityConfiguration(@Autowired(required = false) MethodSecurityExpressionHandler expressionHandler,
...

In addition, the ReactiveAuthorizationManagerMethodSecurityConfiguration configuration already defines a MethodSecurityExpressionHandler bean as a @Fallback bean. Therefore, I believe the parameter expressionHandler being required should not be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config status: invalid An issue that we don't feel is valid
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent constructor declaration on bean with name '_reactiveMethodSecurityConfiguration'
3 participants