Skip to content

ResourceUrlProvider detects wrong set of handler mappings #26562

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

Closed
spring-projects-issues opened this issue Feb 17, 2021 · 1 comment
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: backport An issue that is a backport of another issue to a maintenance branch type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Backport of gh-26561

@spring-projects-issues spring-projects-issues added type: backport An issue that is a backport of another issue to a maintenance branch type: bug A general bug labels Feb 17, 2021
@spring-projects-issues spring-projects-issues added this to the 5.2.14 milestone Feb 17, 2021
@bclozel bclozel self-assigned this Feb 17, 2021
bclozel added a commit that referenced this issue Feb 17, 2021
Prior to this commit, `ResourceUrlProvider` would listen and consider
all `ContextRefreshedEvent` and use the given context to detect
`SimpleUrlHandlerMapping`.

This could lead to situations where a `ResourceUrlProvider` uses another
application context than its own (in a parent/child context setup) and
detect the wrong set of handlers.

Because `ResourceUrlProvider` locks itself once the auto-detection is
done, we need to ensure that it considers only events sent by its
application context.

Fixes gh-26562
@spring-projects-issues
Copy link
Collaborator Author

Fixed via 9f7c8ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: backport An issue that is a backport of another issue to a maintenance branch type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants