From f6d6b5089b8b9b34b471a61feb8c8a3472abcaaa Mon Sep 17 00:00:00 2001 From: Blue Ye Date: Sat, 17 Feb 2024 19:44:58 +0800 Subject: [PATCH 1/3] Update overriding-sdr-response-handlers.adoc fix typo in the mapping path --- .../pages/customizing/overriding-sdr-response-handlers.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc b/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc index 9244b8a87..094f75782 100644 --- a/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc +++ b/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc @@ -47,7 +47,7 @@ class ScannerController { `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>` (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. -IMPORTANT: In this example, the combined path is `RepositoryRestConfiguration.getBasePath()` + `/scanners/search/listProducers`. +IMPORTANT: In this example, the combined path is `RepositoryRestConfiguration.getBasePath()` + `/scanners/search/producers`. [[customizing-sdr.aggregate-references]] == Obtaining Aggregate References From 69739d655f9b9cbf4dcedb5a364f292b5dadfd40 Mon Sep 17 00:00:00 2001 From: Blue Ye Date: Sun, 18 Feb 2024 19:27:59 +0800 Subject: [PATCH 2/3] Fix typo in overriding-sdr-response-handlers.adoc `@RepositoryRestResource` VS. `@BasePathAwareController` is changed to `@RepositoryRestController` VS. `@BasePathAwareController` --- .../pages/customizing/overriding-sdr-response-handlers.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc b/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc index 094f75782..f7e7ce65b 100644 --- a/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc +++ b/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc @@ -93,7 +93,7 @@ In case you are using jMolecules, `AssociationAggregateReference` also allows yo 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. [[customizing-sdr.overriding-sdr-response-handlers.annotations]] -== `@RepositoryRestResource` VS. `@BasePathAwareController` +== `@RepositoryRestController` VS. `@BasePathAwareController` 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`. 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. From f07b8ba9aec4f442bb5c03d98906b476e082d995 Mon Sep 17 00:00:00 2001 From: Blue Ye Date: Sun, 18 Feb 2024 19:34:05 +0800 Subject: [PATCH 3/3] Fix typo overriding-sdr-response-handlers.adoc The text is talking about @RepositoryRestController but the java code uses @BasePathAwareController --- .../pages/customizing/overriding-sdr-response-handlers.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc b/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc index f7e7ce65b..3304b2c40 100644 --- a/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc +++ b/src/main/antora/modules/ROOT/pages/customizing/overriding-sdr-response-handlers.adoc @@ -9,7 +9,7 @@ The following example shows how to use the `@RepositoryRestController` annotatio ==== [source,java] ---- -@BasePathAwareController +@RepositoryRestController class ScannerController { private final ScannerRepository repository; @@ -60,7 +60,7 @@ All you need to do is declare an `@RequestParam` of that type and then consume e [source,java] ---- -@BasePathAwareController +@RepositoryRestController class ScannerController { private final ScannerRepository repository;