You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can notice the up link isn't correct as it will lead to 404 error page with the removal of the trailing slash. If we transform the @GetMapping("") into a @GetMapping, the link will become correct.
For the time being, I don't have time to find the root cause of this issue but I can try to take a look of what's happens here.
Regards,
Patrick
The text was updated successfully, but these errors were encountered:
odrotbohm
changed the title
Spring hateos generate links leading to 404 error
Trailing slash added for request mappings with empty path
Jan 12, 2023
Hello !
This may be related to this issues spring-projects/spring-framework#28552 or spring-projects/spring-framework#29625 but there is a strange behavior using spring hateoas with the removal of the trailing slash.
For example:
The endpoint http://localhost:8080/users/1 will produce the following output:
As you can notice the
up
link isn't correct as it will lead to 404 error page with the removal of the trailing slash. If we transform the@GetMapping("")
into a@GetMapping
, the link will become correct.For the time being, I don't have time to find the root cause of this issue but I can try to take a look of what's happens here.
Regards,
Patrick
The text was updated successfully, but these errors were encountered: