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

Provide Session Id Generation Strategy #2251

Closed
wants to merge 1 commit into from

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Feb 23, 2023

Fix GH-11

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 23, 2023
@quaff quaff force-pushed the patch-5 branch 5 times, most recently from 270aba2 to 492e60f Compare February 24, 2023 00:57
@quaff
Copy link
Contributor Author

quaff commented Mar 13, 2023

@vpavic Switched from SpringFactoriesLoader to java.util.ServiceLoader.

return sessionIdGenerator.generateId();
}

private static final SessionIdGenerator sessionIdGenerator;

Choose a reason for hiding this comment

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

static is not good idea

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then what's your suggestion?

Choose a reason for hiding this comment

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

At present, this PR can solve the problem easily.
I think static is structural problem (not this PR), I prefer PR #1547, using spring DI is better than SPI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That huge changeset is risky, this one is simple and reliable.

@marcusdacoregio
Copy link
Collaborator

Closing in favor of #2286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide Session Id Generation Strategy
5 participants