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
== [[fundamentals.obtaining-links.entity-links]] Using the EntityLinks interface
269
269
270
+
IMPORTANT: `EntityLinks` and it's various implementations are NOT currently provided out-of-the-box for Spring WebFlux applications.
271
+
The contract defined in the `EntityLinks` SPI was originally aimed at Spring Web MVC and doesn't consider Reactor types.
272
+
Developing a comparable contract that supports reactive programming is still in progress.
273
+
270
274
So far, we have created links by pointing to the web-framework implementations (that is, the Spring MVC controllers) and inspected the mapping.
271
275
In many cases, these classes essentially read and write representations backed by a model class.
272
276
@@ -285,13 +289,13 @@ Link link = links.linkToItemResource(Customer.class, 1L);
285
289
286
290
`EntityLinks` is available via dependency injection by activating `@EnableHypermediaSupprt` in your Spring MVC configuration.
287
291
This will cause a variety of default implementations of `EntityLinks` being registered.
288
-
The most fundamental one is `ControllerEntityLinks` that inspects SpringMVC and Spring WebFlux controller classes.
292
+
The most fundamental one is `ControllerEntityLinks` that inspects SpringMVC controller classes.
289
293
If you want to register your own implementation of `EntityLinks`, check out <<server.entity-links.spi, this section>>.
290
294
291
295
[[server.entity-links.controller]]
292
-
=== EntityLinks based on Spring MVC and WebFlux controllers
296
+
=== EntityLinks based on Spring MVC controllers
293
297
294
-
Activating entity links functionality causes all the Spring MVC and WebFlux controllers available in the current `ApplicationContext` to be inspected for the `@ExposesResourceFor(…)` annotation.
298
+
Activating entity links functionality causes all the Spring MVC controllers available in the current `ApplicationContext` to be inspected for the `@ExposesResourceFor(…)` annotation.
295
299
The annotation exposes which model type the controller manages.
296
300
Beyond that, we assume that you adhere to following the URI mapping setup and conventions:
297
301
@@ -421,10 +425,6 @@ It's registered as primary bean so that it's always the sole injection candidate
421
425
`ControllerEntityLinks` is the default implementation that will be included in the setup, but users are free to implement and register their own implementations.
422
426
Making those available to the `EntityLinks` instance available for injection is a matter of registering your implementation as Spring bean.
423
427
424
-
IMPORTANT: `EntityLinks` and it's various implementations are NOT currently provided out-of-the-box for Spring WebFlux applications.
425
-
The contract defined in the `EntityLinks` SPI was originally aimed at Spring Web MVC and doesn't consider Reactor types.
426
-
Developing a comparable contract that supports reactive programming is still in progress.
0 commit comments