Skip to content

Add FONTS location to StaticResourceLocation #46208

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shahabkondri
Copy link

@shahabkondri shahabkondri commented Jun 25, 2025

Motivation

StaticResourceLocation handles common static assets (CSS, JS, IMAGES, …) but omits web-fonts.
As a result, PathRequest.toStaticResources() does not match /fonts/**, forcing users to add custom ant matchers.
Adding a dedicated FONTS location ("/fonts/**") removes that gap.

Implementation

  • New enum constant FONTS("/fonts/**") in StaticResourceLocation.
    No breaking changes; existing constants keep the same semantics.

Tests

  • Unit test verifies that StaticResourceLocation now matches a /fonts/font.woff2 request.

@shahabkondri shahabkondri force-pushed the add-fonts-static-resource branch from c0a0954 to 5804658 Compare June 25, 2025 17:31
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 25, 2025
@shahabkondri shahabkondri changed the title Add FONTS location to StaticResourceLocation Add FONTS location to StaticResourceLocation Jun 25, 2025
Signed-off-by: Shahab Kondri <shahab.kondri@gmail.com>
@shahabkondri shahabkondri force-pushed the add-fonts-static-resource branch from 5804658 to 67ecb4e Compare June 25, 2025 17:51
@philwebb philwebb added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jun 25, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants