Skip to content

Commit 8d4cf6e

Browse files
yejianfengbluemp911de
authored andcommitted
Fix typos and annotation use in reference documentation.
Closes #2370
1 parent c735dfd commit 8d4cf6e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The following example shows how to use the `@RepositoryRestController` annotatio
99
====
1010
[source,java]
1111
----
12-
@BasePathAwareController
12+
@RepositoryRestController
1313
class ScannerController {
1414
1515
private final ScannerRepository repository;
@@ -47,7 +47,7 @@ class ScannerController {
4747

4848
`CollectionModel` is for a collection, while `EntityModel` -- or the more general class `RepresentationModel` -- is for a single item. These types can be combined. If you know the links for each item in a collection, use `CollectionModel<EntityModel<String>>` (or whatever the core domain type is rather than `String`). Doing so lets you assemble links for each item as well as for the whole collection.
4949

50-
IMPORTANT: In this example, the combined path is `RepositoryRestConfiguration.getBasePath()` + `/scanners/search/listProducers`.
50+
IMPORTANT: In this example, the combined path is `RepositoryRestConfiguration.getBasePath()` + `/scanners/search/producers`.
5151

5252
[[customizing-sdr.aggregate-references]]
5353
== Obtaining Aggregate References
@@ -60,7 +60,7 @@ All you need to do is declare an `@RequestParam` of that type and then consume e
6060

6161
[source,java]
6262
----
63-
@BasePathAwareController
63+
@RepositoryRestController
6464
class ScannerController {
6565
6666
private final ScannerRepository repository;
@@ -93,7 +93,7 @@ In case you are using jMolecules, `AssociationAggregateReference` also allows yo
9393
While both of the abstraction assume the value for the parameter to be a URI matching the scheme that Spring Data REST uses to expose item resources, that source value resolution can be customized by calling `….withIdSource(…)` on the reference instance to provide a function to extract the identifier value to be used for aggregate resolution eventually from the `UriComponents` obtained from the URI received.
9494

9595
[[customizing-sdr.overriding-sdr-response-handlers.annotations]]
96-
== `@RepositoryRestResource` VS. `@BasePathAwareController`
96+
== `@RepositoryRestController` VS. `@BasePathAwareController`
9797

9898
If you are not interested in entity-specific operations but still want to build custom operations underneath `basePath`, such as Spring MVC views, resources, and others, use `@BasePathAwareController`.
9999
If you're using `@RepositoryRestController` on your custom controller, it will only handle the request if your request mappings blend into the URI space used by the repository.

0 commit comments

Comments
 (0)