Skip to content

Configuration defaults to SessionRegistry bean #8548

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

Merged
merged 2 commits into from
May 23, 2020

Conversation

candrews
Copy link
Contributor

If a SessionRegistry is necessary, check for one in the ApplicationContext before creating one.

See spring-projects/spring-session#1629

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 18, 2020
@rwinch rwinch added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels May 21, 2020
Copy link
Member

@rwinch rwinch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Pull Request. Could you please add a test that verifies this works when there is one SessionRegistry bean (should use that bean) and more than one SessionRegistry bean (should not break with NoUniqueBeanDefinitionException.

@rwinch rwinch added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement and removed status: waiting-for-feedback We need additional information before we can continue labels May 21, 2020
candrews added 2 commits May 21, 2020 16:49
If a SessionRegistry is necessary, check for one in the ApplicationContext before creating one.
Use `getBeanOrNull` in `registerDelegateApplicationListener` to simplify implementation.

This change does not alter behavior.
@candrews
Copy link
Contributor Author

Could you please add a test that verifies this works when there is one SessionRegistry bean (should use that bean) and more than one SessionRegistry bean (should not break with NoUniqueBeanDefinitionException.

I've added the two tests as requested.

Thanks again!

@rwinch rwinch changed the title Check for an existing SessionRegistry bean Configuration defaults to SessionRegistry bean May 23, 2020
@rwinch rwinch added in: config An issue in spring-security-config and removed in: web An issue in web modules (web, webmvc) labels May 23, 2020
@rwinch rwinch self-assigned this May 23, 2020
@rwinch rwinch added this to the 5.4.0-M2 milestone May 23, 2020
@rwinch rwinch merged commit f1db716 into spring-projects:master May 23, 2020
@rwinch
Copy link
Member

rwinch commented May 23, 2020

Thanks for the Pull Request! This is now merged into master 😄

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