Skip to content
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

[Backport release/1.9.x] Resolve ambiguous handler mapping in SeedController #580

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

groldan
Copy link
Member

@groldan groldan commented Dec 18, 2024

Backport #579
Authored by: @groldan

Override the `@PostMapping` path pattern in `SeedController` to exclude `.xml`
and `.json` suffixes, addressing a stricter behavior in Spring Boot compared
to regular Spring. This resolves a potential `IllegalStateException` caused by
ambiguous handler methods.

- Updated `doPost` endpoint path to use regex excluding `.xml` and `.json`.
- Prevents conflicts between JSON and XML payload handlers (`seedOrTruncateWithJsonPayload`
  and `seedOrTruncateWithXmlPayload`).
- Fixes mapping collision issues observed when calling endpoints like
  `/rest/seed/workspace:layer.xml` under Spring Boot.

This change ensures compatibility with Spring Boot's stricter handler mapping
rules while maintaining functionality consistent with the base `SeedController` logic.
@groldan groldan merged commit 146a81a into release/1.9.x Dec 18, 2024
2 of 4 checks passed
@groldan groldan deleted the backport-579-to-release/1.9.x branch December 18, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant