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
Rename Jackson3... classes to Jackson to align class naming.
Align class naming to drop the 3 from Jackson class names. Also, rename Jackson3ObjectReader and ...Writer to JacksonReadeReader and JacksonJacksonWriter and rename the Jackson 2-based variants to Jackson2....
Closes: #3219
Original Pull Request: #3220
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/redis/hash-mappers.adoc
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,10 @@
1
1
[[redis.hashmappers.root]]
2
2
= Hash Mapping
3
3
4
-
Data can be stored by using various data structures within Redis. javadoc:org.springframework.data.redis.serializer.Jackson3JsonRedisSerializer[] can convert objects in https://en.wikipedia.org/wiki/JSON[JSON] format. Ideally, JSON can be stored as a value by using plain keys. You can achieve a more sophisticated mapping of structured objects by using Redis hashes. Spring Data Redis offers various strategies for mapping data to hashes (depending on the use case):
4
+
Data can be stored by using various data structures within Redis. javadoc:org.springframework.data.redis.serializer.JacksonJsonRedisSerializer[] can convert objects in https://en.wikipedia.org/wiki/JSON[JSON] format.
5
+
Ideally, JSON can be stored as a value by using plain keys.
6
+
You can achieve a more sophisticated mapping of structured objects by using Redis hashes.
7
+
Spring Data Redis offers various strategies for mapping data to hashes (depending on the use case):
5
8
6
9
* Direct mapping, by using javadoc:org.springframework.data.redis.core.HashOperations[] and a xref:redis.adoc#redis:serializer[serializer]
7
10
* Using xref:repositories.adoc[Redis Repositories]
@@ -16,7 +19,7 @@ Multiple implementations are available:
16
19
17
20
* javadoc:org.springframework.data.redis.hash.BeanUtilsHashMapper[] using Spring's {spring-framework-javadoc}/org/springframework/beans/BeanUtils.html[BeanUtils].
18
21
* javadoc:org.springframework.data.redis.hash.ObjectHashMapper[] using xref:redis/redis-repositories/mapping.adoc[Object-to-Hash Mapping].
19
-
* <<redis.hashmappers.jackson3,`Jackson3HashMapper`>> using https://github.com/FasterXML/jackson[FasterXML Jackson 3].
22
+
* <<redis.hashmappers.jackson3,`JacksonHashMapper`>> using https://github.com/FasterXML/jackson[FasterXML Jackson 3].
20
23
* <<redis.hashmappers.jackson2,`Jackson2HashMapper`>> (deprecated) using https://github.com/FasterXML/jackson[FasterXML Jackson 2].
21
24
22
25
The following example shows one way to implement hash mapping:
@@ -52,10 +55,10 @@ public class HashMapping {
52
55
----
53
56
54
57
[[redis.hashmappers.jackson3]]
55
-
=== Jackson3HashMapper
58
+
=== JacksonHashMapper
56
59
57
-
javadoc:org.springframework.data.redis.hash.Jackson3HashMapper[] provides Redis Hash mapping for domain objects by using https://github.com/FasterXML/jackson[FasterXML Jackson 3].
58
-
`Jackson3HashMapper` can map top-level properties as Hash field names and, optionally, flatten the structure.
60
+
javadoc:org.springframework.data.redis.hash.JacksonHashMapper[] provides Redis Hash mapping for domain objects by using https://github.com/FasterXML/jackson[FasterXML Jackson 3].
61
+
`JacksonHashMapper` can map top-level properties as Hash field names and, optionally, flatten the structure.
59
62
Simple types map to simple values. Complex types (nested objects, collections, maps, and so on) are represented as nested JSON.
60
63
61
64
Flattening creates individual hash entries for all nested properties and resolves complex types into simple types, as far as possible.
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/redis/template.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,7 +365,7 @@ Multiple implementations are available (including two that have been already men
365
365
* javadoc:org.springframework.data.redis.serializer.JdkSerializationRedisSerializer[], which is used by default for javadoc:org.springframework.data.redis.cache.RedisCache[] and javadoc:org.springframework.data.redis.core.RedisTemplate[].
366
366
* the `StringRedisSerializer`.
367
367
368
-
However, one can use `OxmSerializer` for Object/XML mapping through Spring {spring-framework-docs}/data-access.html#oxm[OXM] support or javadoc:org.springframework.data.redis.serializer.Jackson3JsonRedisSerializer[] or javadoc:org.springframework.data.redis.serializer.GenericJackson3JsonRedisSerializer[] for storing data in https://en.wikipedia.org/wiki/JSON[JSON] format.
368
+
However, one can use `OxmSerializer` for Object/XML mapping through Spring {spring-framework-docs}/data-access.html#oxm[OXM] support or javadoc:org.springframework.data.redis.serializer.JacksonJsonRedisSerializer[] or javadoc:org.springframework.data.redis.serializer.GenericJacksonJsonRedisSerializer[] for storing data in https://en.wikipedia.org/wiki/JSON[JSON] format.
369
369
370
370
Do note that the storage format is not limited only to values.
371
371
It can be used for keys, values, or hashes without any restrictions.
0 commit comments