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
@@ -1377,6 +1377,7 @@ The configuration shown in the <<core.web,previous section>> registers a few bas
1377
1377
1378
1378
- A <<core.web.basic.domain-class-converter>> to let Spring MVC resolve instances of repository-managed domain classes from request parameters or path variables.
1379
1379
- <<core.web.basic.paging-and-sorting,`HandlerMethodArgumentResolver`>> implementations to let Spring MVC resolve `Pageable` and `Sort` instances from request parameters.
1380
+
- <<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.
1380
1381
1381
1382
[[core.web.basic.domain-class-converter]]
1382
1383
===== Using the `DomainClassConverter` Class
@@ -1539,6 +1540,29 @@ The assembler produced the correct URI and also picked up the default configurat
1539
1540
This means that, if you change that configuration, the links automatically adhere to the change.
1540
1541
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.
1541
1542
1543
+
[[core.web.basic.jackson-mappers]]
1544
+
==== Spring Data Jackson Modules
1545
+
1546
+
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. +
1547
+
Those Modules are imported once <<core.web, web support>> is enabled and `com.fasterxml.jackson.databind.ObjectMapper` is available.
1548
+
1549
+
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`.
1550
+
1551
+
Data binding mixins for the following domain types are registered by the common infrastructure.
1552
+
----
1553
+
org.springframework.data.geo.Distance
1554
+
org.springframework.data.geo.Point
1555
+
org.springframework.data.geo.Box
1556
+
org.springframework.data.geo.Circle
1557
+
org.springframework.data.geo.Polygon
1558
+
----
1559
+
1560
+
[NOTE]
1561
+
====
1562
+
The individual module may provide additional `SpringDataJacksonModules`. +
1563
+
Please refer to the store specific section for more details.
0 commit comments