Skip to content

Could NoResourceFoundException leave the resource path as is? #34553

Open
@kontza

Description

@kontza

** Enhancements requests **
Hi, I've just spent the last five hours debugging a "problem": one of our micro services has an endpoint /api/v1/instances/filter. Now that I upgraded Spring Boot to the latest version, requests from another micro service to /api/v1/instances/filter/, note the trailing slash, throws an exception. I accept that, but what I find hard to swallow is the logging from the Exception:

org.springframework.web.servlet.resource.NoResourceFoundException: No static resource api/v1/cases/filter.
...

Some layer strips:

  1. The leading slash.
  2. The trailing slash.

Would it be impossible to use log something like:

"No static resource '%s'".formatted(resourcePathExactlyAsReceived);

I.e. stop chomping the resource path and log it as it is?

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions