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

Avoid unnecessary instantiation of HttpSecurity #16370

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

kse-music
Copy link
Contributor

@kse-music kse-music commented Jan 8, 2025

Use ObjectProvider instead of @Autowired HttpSecurity because when the user provides a SecurityFilterChain bean, it will still inject HttpSecurity. Since HttpSecurity is a prototype bean, this avoids its instantiation.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 8, 2025
@kse-music kse-music force-pushed the pr11 branch 2 times, most recently from 2623bf8 to 1de2f36 Compare January 9, 2025 02:45
kse-music and others added 2 commits January 9, 2025 16:49
…Chain bean is provided

Signed-off-by: DingHao <dh.hiekn@gmail.com>
Issue spring-projectsgh-16370

Signed-off-by: Rob Winch <362503+rwinch@users.noreply.github.com>
@rwinch
Copy link
Member

rwinch commented Jan 9, 2025

Thanks for the PR! I went ahead and rebased it and pushed a minor change b21850a. Once the build passes this will be merged into main. Thanks again for the PR 😄

@rwinch rwinch enabled auto-merge (rebase) January 9, 2025 23:13
@rwinch rwinch self-assigned this Jan 9, 2025
@rwinch rwinch added in: config An issue in spring-security-config type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 9, 2025
@rwinch rwinch added this to the 6.5.0-M1 milestone Jan 9, 2025
@rwinch rwinch merged commit 72a2831 into spring-projects:main Jan 9, 2025
6 checks passed
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 type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants