Skip to content

Introduce classpath*: support for ResourceLoader#getResource with fully specified resource path #36415

Closed

Description

@jhoeller

Inspired by #36292, generalizing classpath*: support for a fully specified resource path without pattern resolution:

Non-pattern classpath*: support could be built into (Default)ResourceLoader, so that a getResource("classpath*:messages.properties") call does not fail like right now but rather expose a merged Resource handle with InputStream access to all same-named resources on the classpath.

This implies moving the CLASSPATH_ALL_URL_PREFIX constant to the top-level ResourceLoader interface with corresponding behavior for fully specified URL locations in a plain getResource call - next to the existing pattern-aware semantics for getResources in ResourcePatternResolver which would remain unchanged.

Activity

  1. added this to the 7.1.x milestone on Mar 3, 2026
  2. self-assigned this
    on Mar 3, 2026
  3. added
    in: coreIssues in core modules (aop, beans, core, context, expression)
    on Mar 3, 2026
  4. modified the milestones: 7.1.x, 7.1.0-M1 on Mar 13, 2026
  5. added a commit that references this issue on Mar 16, 2026
    1345760
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions