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
Copy file name to clipboardExpand all lines: src/main/asciidoc/index.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ Link link = linkTo(methodOn(PersonController.class).show(2L)).withSelfRel();
180
180
assertThat(link.getHref(), is("/people/2")));
181
181
----
182
182
183
-
`methodOn(…)` creates a proxy of the controller class that is recording the method invocation and exposed it in a proxy created for the return type of the method. This allows the fluent expression of the method we want to obtain the mapping for. However there are a few constraints on the methods that can be obtained using this technique:
183
+
`methodOn(…)` creates a proxy of the controller class that is recording the method invocation and exposes it in a proxy created for the return type of the method. This allows the fluent expression of the method we want to obtain the mapping for. However there are a few constraints on the methods that can be obtained using this technique:
184
184
185
185
1. The return type has to be capable of proxying as we need to expose the method invocation on it.
186
186
2. The parameters handed into the methods are generally neglected, except the ones referred to through `@PathVariable` as they make up the URI.
0 commit comments