Classic Integration: Project Setup
Learn how to setup a Spring Boot application with classic Kafka Streams integration.
We will build a simple stateful Kafka Streams application, including a queryable state store accessible via a REST API, using Spring Boot.
Project setup
All Spring Boot projects have a similar structure. The easiest way to create a Spring Boot project is to use the official tool called spring initializr which allows us to conveniently choose our build tool, Java and Spring versions, and the required dependencies. We will start by choosing the various project details:
Second, we will choose the dependencies required for a Spring Boot Kafka Streams application by clicking the “ADD DEPENDENCIES” button and typing Kafka Streams. We need the following dependencies:
Spring for Apache Kafka
Spring for Apache Kafka Streams
Now we can click the “GENERATE” button at the bottom of the page, which will open up a download dialog for our zipped new project:
The project can be unzipped to reveal the following structure: