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
When generating a link to a method which is mapped without a leading slash (@RequestMapping("hello")), the mapping generated in AnnotationMappingDiscoverer#getMapping(Class<?>, Method) does not have a leading slash as well.
If the request does not contain a context path this is not a problem, but if it does context path and mapping are concatenated without a slash inbetween.
imo this could be fixed by adding the leading slash in AnnotationMappingDiscoverer#cleanup(), but this would of course be a breaking change, which causes two tests in AnnotationMappingDiscovererUnitTest to fail
For an example see this repository and the test in com.example.HateoasSlashExampleApplicationTests
The text was updated successfully, but these errors were encountered:
When generating a link to a method which is mapped without a leading slash (
@RequestMapping("hello")
), the mapping generated inAnnotationMappingDiscoverer#getMapping(Class<?>, Method)
does not have a leading slash as well.If the request does not contain a context path this is not a problem, but if it does context path and mapping are concatenated without a slash inbetween.
imo this could be fixed by adding the leading slash in
AnnotationMappingDiscoverer#cleanup()
, but this would of course be a breaking change, which causes two tests inAnnotationMappingDiscovererUnitTest
to failFor an example see this repository and the test in
com.example.HateoasSlashExampleApplicationTests
The text was updated successfully, but these errors were encountered: