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
e7b94be9
Commit
e7b94be9
authored
Jul 23, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Document `@EmbeddedKafka` and its interaction with Spring Boot"
See gh-15834
parent
4e79408b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+7
-6
No files found.
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
e7b94be9
...
...
@@ -6286,13 +6286,13 @@ explicitly supports.
[[boot-features-embedded-kafka]]
==== Testing with Embedded Kafka
Spring for Apache Kafka provides a convenient way to test projects with an embedded Apache Kafka
broker. T
his feature is available via an `@EmbeddedKafka` test class level annotation from the
`spring-kafka-test` dependency. See more information in
the Spring for Apache Kafka
broker. T
o use this feature, annotate a test class with `@EmbeddedKafka` from the `spring-kafka-test`
module. For more information, please see
the Spring for Apache Kafka
https://docs.spring.io/spring-kafka/docs/current/reference/html/#embedded-kafka-annotation[reference manual].
To make Spring Boot auto-configuration work with the mentioned embedded Apache Kafka broker, you need
To make Spring Boot auto-configuration work with the
afore
mentioned embedded Apache Kafka broker, you need
to remap a system property for embedded broker addresses (populated by the `EmbeddedKafkaBroker`)
into Spring Boot configuration property for Apache Kafka. There are several ways to do that:
into
the
Spring Boot configuration property for Apache Kafka. There are several ways to do that:
* Provide a system property to map embedded broker addresses into `spring.kafka.bootstrap-servers` in the test class:
...
...
@@ -6303,7 +6303,7 @@ static {
}
----
* Configur
ing
a property name on the `@EmbeddedKafka` annotation:
* Configur
e
a property name on the `@EmbeddedKafka` annotation:
[source,java,indent=0]
----
...
...
@@ -6311,7 +6311,7 @@ static {
bootstrapServersProperty = "spring.kafka.bootstrap-servers")
----
*
Via placeholders
in configuration properties:
*
Use a placeholder
in configuration properties:
[source,properties,indent=0]
----
...
...
@@ -6319,6 +6319,7 @@ spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}
----
[[boot-features-resttemplate]]
== Calling REST Services with `RestTemplate`
If you need to call remote REST services from your application, you can use the Spring
...
...
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