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/repositories.adoc
+24
Original file line number
Diff line number
Diff line change
@@ -1373,6 +1373,7 @@ The configuration shown in the <<core.web,previous section>> registers a few bas
1373
1373
1374
1374
- A <<core.web.basic.domain-class-converter>> to let Spring MVC resolve instances of repository-managed domain classes from request parameters or path variables.
1375
1375
- <<core.web.basic.paging-and-sorting,`HandlerMethodArgumentResolver`>> implementations to let Spring MVC resolve `Pageable` and `Sort` instances from request parameters.
1376
+
- <<core.web.basic.jackson-mappers, Jackson Modules>> to de-/serialize types like `Point` and `Distance`, or store specific ones, depending on the Spring Data Module used.
1376
1377
1377
1378
[[core.web.basic.domain-class-converter]]
1378
1379
===== Using the `DomainClassConverter` Class
@@ -1535,6 +1536,29 @@ The assembler produced the correct URI and also picked up the default configurat
1535
1536
This means that, if you change that configuration, the links automatically adhere to the change.
1536
1537
By default, the assembler points to the controller method it was invoked in, but you can customize that by passing a custom `Link` to be used as base to build the pagination links, which overloads the `PagedResourcesAssembler.toResource(…)` method.
1537
1538
1539
+
[[core.web.basic.jackson-mappers]]
1540
+
==== Spring Data Jackson Modules
1541
+
1542
+
The core module, and some of the store specific ones, ship with a set of Jackson Modules for types, like `org.springframework.data.geo.Distance` and `org.springframework.data.geo.Point`, used by the Spring Data domain. +
1543
+
Those Modules are imported once <<core.web, web support>> is enabled and `com.fasterxml.jackson.databind.ObjectMapper` is available.
1544
+
1545
+
During initialization `SpringDataJacksonModules`, like the `SpringDataJacksonConfiguration`, get picked up by the infrastructure, so that the declared ``com.fasterxml.jackson.databind.Module``s are made available to the Jackson `ObjectMapper`.
1546
+
1547
+
Data binding mixins for the following domain types are registered by the common infrastructure.
1548
+
----
1549
+
org.springframework.data.geo.Distance
1550
+
org.springframework.data.geo.Point
1551
+
org.springframework.data.geo.Box
1552
+
org.springframework.data.geo.Circle
1553
+
org.springframework.data.geo.Polygon
1554
+
----
1555
+
1556
+
[NOTE]
1557
+
====
1558
+
The individual module may provide additional `SpringDataJacksonModules`. +
1559
+
Please refer to the store specific section for more details.
0 commit comments