Skip to content

Fix EndpointRequest.toLinks() not matching when base-path is '/'#49253

Closed
apoorvdarshan wants to merge 3288 commits intospring-projects:3.5.xfrom
apoorvdarshan:fix/endpoint-request-tolinks-root-basepath
Closed

Fix EndpointRequest.toLinks() not matching when base-path is '/'#49253
apoorvdarshan wants to merge 3288 commits intospring-projects:3.5.xfrom
apoorvdarshan:fix/endpoint-request-tolinks-root-basepath

Conversation

@apoorvdarshan
Copy link

Summary

  • When management.endpoints.web.base-path is set to "/", cleanBasePath() stripped it to "", causing LinksRequestMatcher to return EMPTY_MATCHER (always false)
  • Preserve "/" as a valid base path in WebEndpointProperties.cleanBasePath() by only stripping trailing / from paths longer than 1 character
  • Avoid producing "//" patterns in servlet and reactive link matchers when basePath already ends with /

Fixes gh-34834

snicoll and others added 30 commits January 27, 2026 08:24
In addition to the upgrade, this commit also fixes some contract
violations in non-public APIs that are now detected as the new
version of the plugin enables contract checking by default.

Closes spring-projectsgh-49000
…ecordExporterBuilder

See spring-projectsgh-49002

Signed-off-by: Joaquin Santana <joaquinjsb@outlook.com>
* pr/49002:
  Polish "Add customizers for OtlpHttpLogRecordExporterBuilder and OtlpGrpcLogRecordExporterBuilder"
  Add customizers for OtlpHttpLogRecordExporterBuilder and OtlpGrpcLogRecordExporterBuilder

Closes spring-projectsgh-49002
Prior to this commit, the `XmlMapper` auto-configuration for Jackson2
would refer to Jackson3's `XmlMapper` instead of Jackson2. This would
not only make the condition invalid, but it could also lead to
`NoClassDefFoundError` at runtime if the application mixed Jackson 2 and
3 on the classpath.

Fixes spring-projectsgh-49015
snicoll and others added 24 commits February 15, 2026 15:52
Update `RestClientAutoConfiguration` to ensure that it applies after
`HttpMessageConvertersAutoConfiguration`.

Prior to this commit, the `HttpMessageConvertersRestClientCustomizer`
bean might not get created due to the `@ConditionalOnBean` guard not
finding any `ClientHttpMessageConvertersCustomizer` beans.

Since the issue is surprising hard to replicate in a unit test, a new
smoke test has been added to ensure the problem doesn't return.

Fixes spring-projectsgh-49223
When management.endpoints.web.base-path is set to "/",
cleanBasePath() stripped it to "", making LinksRequestMatcher
return EMPTY_MATCHER (always false). Preserve "/" as a valid
base path and avoid producing "//" patterns in link matchers.

Fixes spring-projectsgh-34834

Signed-off-by: Apoorv Darshan <ad13dtu@gmail.com>
@apoorvdarshan apoorvdarshan force-pushed the fix/endpoint-request-tolinks-root-basepath branch from c25a9c2 to 51a7a86 Compare February 18, 2026 16:04
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 18, 2026
@philwebb
Copy link
Member

Thanks, but we already have a PR open for this that I'd like to review first (see #49191)

@philwebb philwebb closed this Feb 18, 2026
@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments