#1063 - Remove @EnableEntityLinks from documentation.

This commit is contained in:
Greg Turnquist
2019-09-03 09:17:25 -05:00
parent e5669eefa0
commit 28ecf0ce54
2 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ To let the `RepresentationModel` subtypes be rendered according to the specifica
* It registers necessary Jackson modules to render `EntityModel` and `CollectionModel` in the hypermedia specific format.
* 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>>).
* 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.
* 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.
* 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>>).
[[configuration.at-enable.stacks]]

View File

@@ -283,7 +283,7 @@ Link link = links.linkToItemResource(Customer.class, 1L);
----
====
`EntityLinks` is available via dependency injection by activating either `@EnableHypermediaSupprt` or `@EnableEntityLinks` in your Spring MVC configuration.
`EntityLinks` is available via dependency injection by activating `@EnableHypermediaSupprt` in your Spring MVC configuration.
This will cause a variety of default implementations of `EntityLinks` being registered.
The most fundamental one is `ControllerEntityLinks` that inspects SpringMVC and Spring WebFlux controller classes.
If you want to register your own implementation of `EntityLinks`, check out <<server.entity-links.spi, this section>>.
@@ -322,7 +322,7 @@ class OrderController {
<4> An additional controller method to handle a subordinate resource taking a path variable to expose an item resource, i.e. a single `Order`.
====
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:
With this in place, when you enable `EntityLinks` `@EnableHypermediaSupport` in your Spring MVC configuration, you can create links to the controller, as follows:
====
[source, java]
@@ -344,7 +344,7 @@ class PaymentController {
}
}
----
<1> Inject `EntityLinks` made available by `@EnableEntityLinks` or `@EnableHypermediaSupport` in you configuration.
<1> Inject `EntityLinks` made available by `@EnableHypermediaSupport` in you configuration.
<2> Use the APIs to build links by using the entity types instead of controller classes.
====
@@ -416,7 +416,7 @@ class OrderController {
[[server.entity-links.spi]]
=== EntityLinks as SPI
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`.
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`.
It's registered as primary bean so that it's always the sole injection candidate when you inject `EntityLinks` in general.
`ControllerEntityLinks` is the default implementation that will be included in the setup, but users are free to implement and register their own implementations.
Making those available to the `EntityLinks` instance available for injection is a matter of registering your implementation as Spring bean.