DATACMNS-513 - PagedResourcesAssemblerArgumentResolver now correctly resolves mappings for sub-class invocations.
We're now using the newly introduced method on ControllerLinkBuilderFactory that takes both a type and a method to forward the method the invocation is happening on independently from the method being invoked.
This commit is contained in:
@@ -101,7 +101,7 @@ public class PagedResourcesAssemblerArgumentResolver implements HandlerMethodArg
|
||||
private UriComponents resolveBaseUri(MethodParameter parameter) {
|
||||
|
||||
try {
|
||||
Link linkToMethod = linkBuilderFactory.linkTo(parameter.getMethod(), new Object[0]).withSelfRel();
|
||||
Link linkToMethod = linkBuilderFactory.linkTo(parameter.getDeclaringClass(), parameter.getMethod()).withSelfRel();
|
||||
return UriComponentsBuilder.fromUriString(linkToMethod.getHref()).build();
|
||||
} catch (IllegalArgumentException o_O) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user