Skip to content

Commit 19c1bbe

Browse files
committed
docs(kafka): Replace deprecated Json(De)Serializer with Jackson variants in examples
Signed-off-by: bachhs <bachhs21@gmail.com>
1 parent a20a93a commit 19c1bbe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/kafka.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,27 @@ spring:
120120

121121
This sets the common `prop.one` Kafka property to `first` (applies to producers, consumers, admins, and streams), the `prop.two` admin property to `second`, the `prop.three` consumer property to `third`, the `prop.four` producer property to `fourth` and the `prop.five` streams property to `fifth`.
122122

123-
You can also configure the Spring Kafka javadoc:org.springframework.kafka.support.serializer.JsonDeserializer[] as follows:
123+
You can also configure the Spring Kafka javadoc:org.springframework.kafka.support.serializer.JacksonJsonDeserializer[] as follows:
124124

125125
[configprops,yaml]
126126
----
127127
spring:
128128
kafka:
129129
consumer:
130-
value-deserializer: "org.springframework.kafka.support.serializer.JsonDeserializer"
130+
value-deserializer: "org.springframework.kafka.support.serializer.JacksonJsonDeserializer"
131131
properties:
132132
"[spring.json.value.default.type]": "com.example.Invoice"
133133
"[spring.json.trusted.packages]": "com.example.main,com.example.another"
134134
----
135135

136-
Similarly, you can disable the javadoc:org.springframework.kafka.support.serializer.JsonSerializer[] default behavior of sending type information in headers:
136+
Similarly, you can disable the javadoc:org.springframework.kafka.support.serializer.JacksonJsonSerializer[] default behavior of sending type information in headers:
137137

138138
[configprops,yaml]
139139
----
140140
spring:
141141
kafka:
142142
producer:
143-
value-serializer: "org.springframework.kafka.support.serializer.JsonSerializer"
143+
value-serializer: "org.springframework.kafka.support.serializer.JacksonJsonSerializer"
144144
properties:
145145
"[spring.json.add.type.headers]": false
146146
----

0 commit comments

Comments
 (0)