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/configuration.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ To let the `RepresentationModel` subtypes be rendered according to the specifica
10
10
11
11
* It registers necessary Jackson modules to render `EntityModel` and `CollectionModel` in the hypermedia specific format.
12
12
* If JSONPath is on the classpath, it automatically registers a `LinkDiscoverer` instance to look up links by their `rel` in plain JSON representations (see <<client.link-discoverer>>).
13
-
* By default, it enables `@EnableEntityLinks` (see <<fundamentals.obtaining-links.entity-links>>) and automatically picks up `EntityLinks` implementations and bundles them into a `DelegatingEntityLinks` instance that you can autowire.
13
+
* By default, it enables <<fundamentals.obtaining-links.entity-links,entity links>> and automatically picks up `EntityLinks` implementations and bundles them into a `DelegatingEntityLinks` instance that you can autowire.
14
14
* It automatically picks up all `RelProvider` implementations in the `ApplicationContext` and bundles them into a `DelegatingRelProvider` that you can autowire. It registers providers to consider `@Relation` on domain types as well as Spring MVC controllers. If the https://github.com/atteo/evo-inflector[EVO inflector] is on the classpath, collection `rel` values are derived by using the pluralizing algorithm implemented in the library (see <<spis.rel-provider>>).
Copy file name to clipboardExpand all lines: src/main/asciidoc/server.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,7 @@ Link link = links.linkToItemResource(Customer.class, 1L);
283
283
----
284
284
====
285
285
286
-
`EntityLinks` is available via dependency injection by activating either `@EnableHypermediaSupprt` or `@EnableEntityLinks` in your Spring MVC configuration.
286
+
`EntityLinks` is available via dependency injection by activating `@EnableHypermediaSupprt` in your Spring MVC configuration.
287
287
This will cause a variety of default implementations of `EntityLinks` being registered.
288
288
The most fundamental one is `ControllerEntityLinks` that inspects SpringMVC and Spring WebFlux controller classes.
289
289
If you want to register your own implementation of `EntityLinks`, check out <<server.entity-links.spi, this section>>.
@@ -322,7 +322,7 @@ class OrderController {
322
322
<4> An additional controller method to handle a subordinate resource taking a path variable to expose an item resource, i.e. a single `Order`.
323
323
====
324
324
325
-
With this in place, when youy enable `EntityLinks` through `@EnableEntityLinks` or `@EnableHypermediaSupport` in your Spring MVC configuration, you can create links to the controller, as follows:
325
+
With this in place, when you enable `EntityLinks` `@EnableHypermediaSupport` in your Spring MVC configuration, you can create links to the controller, as follows:
326
326
327
327
====
328
328
[source, java]
@@ -344,7 +344,7 @@ class PaymentController {
344
344
}
345
345
}
346
346
----
347
-
<1> Inject `EntityLinks` made available by `@EnableEntityLinks` or `@EnableHypermediaSupport` in you configuration.
347
+
<1> Inject `EntityLinks` made available by `@EnableHypermediaSupport` in you configuration.
348
348
<2> Use the APIs to build links by using the entity types instead of controller classes.
349
349
====
350
350
@@ -416,7 +416,7 @@ class OrderController {
416
416
[[server.entity-links.spi]]
417
417
=== EntityLinks as SPI
418
418
419
-
The `EntityLinks` instance created by `@EnableEntityLinks` / `@EnableHypermediaSupport` is of type `DelegatingEntityLinks` which will in turn pick up all other `EntityLinks` implementations available as beans in the `ApplicationContext`.
419
+
The `EntityLinks` instance created by `@EnableHypermediaSupport` is of type `DelegatingEntityLinks` which will in turn pick up all other `EntityLinks` implementations available as beans in the `ApplicationContext`.
420
420
It's registered as primary bean so that it's always the sole injection candidate when you inject `EntityLinks` in general.
421
421
`ControllerEntityLinks` is the default implementation that will be included in the setup, but users are free to implement and register their own implementations.
422
422
Making those available to the `EntityLinks` instance available for injection is a matter of registering your implementation as Spring bean.
0 commit comments