Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
ebcfe79d
Commit
ebcfe79d
authored
Jan 16, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11638 from garyrussell:kafkadocs
* pr/11638: Polish Kafka documentation
parents
22c22a1c
0af67b86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+25
-6
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
ebcfe79d
...
@@ -5251,13 +5251,32 @@ properties that are not directly supported, use the following properties:
...
@@ -5251,13 +5251,32 @@ properties that are not directly supported, use the following properties:
[source,properties,indent=0]
[source,properties,indent=0]
----
----
spring.kafka.properties.prop.one=first
spring.kafka.properties.prop.one=first
spring.kafka.consumer.properties.prop.two=second
spring.kafka.admin.properties.prop.two=second
spring,kafka.producer.properties.prop.three=third
spring.kafka.consumer.properties.prop.three=third
spring,kafka.producer.properties.prop.four=fourth
----
----
This sets the common `prop.one` Kafka property to `first` (applies to both producers and
This sets the common `prop.one` Kafka property to `first` (applies to producers,
consumers), the consumer `prop.two` property to `second` and the `prop.three` producer
consumers and admins), the `prop.two` admin property to `second`, the `prop.three`
property to `third`.
consumer property to `third` and the `prop.four` producer property to `fourth`.
You can also configure the Spring Kafka `JsonDeserializer` as follows:
[source,properties,indent=0]
----
spring.kafka.consumer.value-deserializer=org.springframework.kafka.support.serializer.JsonDeserializer
spring.kafka.consumer.properties.spring.json.value.default.type=org.foo.Invoice
spring.kafka.consumer.properties.spring.json.trusted.packages=org.foo,org.bar
----
Similarly, you can disable the `JsonSerializer` default behavior of sending type
information in headers:
[source,properties,indent=0]
----
spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer
spring.kafka.producer.properties.spring.json.add.type.headers=false
----
IMPORTANT: Properties set in this way override any configuration item that Spring Boot
IMPORTANT: Properties set in this way override any configuration item that Spring Boot
explicitly supports.
explicitly supports.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment