Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
7
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Spring Boot 3.5.7 + Kafka microservice demonstrating producer-consumer patterns with PostgreSQL persistence. Java 21 required.
Before writing any code, always propose a clear solution plan. The plan must include:
# Build ./mvnw clean install # Clean build with tests ./mvnw compile # Compile only (also generates OpenAPI code) ./mvnw package # Create JAR # Run ./mvnw spring-boot:run -Dspring-boot.run.arguments="--spring.profiles.active=local" # Test ./mvnw test # Run all tests ./mvnw test -Dtest=ClassName # Run single test class # Infrastructure docker-compose up # Start Kafka, PostgreSQL, Conduktor, Schema Registry docker-compose down # Stop all services
HTTP POST /echo → EchoController → EchoService → EchoProducer → Kafka topic-1 ↓ PostgreSQL (kafka.messages) ← EchoService ← EchoConsumer ← topic-1
EchoApi interfaceEchoProducer publishes to Kafka topicsEchoConsumer listens with @KafkaListener, logs headersEchoService orchestrates publishing and processes consumed messagesRetryableProcessingException (3 retries, 2s backoff) and NonRetryableBusinessException (sent to DLT)API interfaces and models are generated from
src/main/resources/openapi.yaml during compilation. Generated code goes to target/generated-sources/openapi/.
src/main/resources/db/migration/auth (users), kafka (messages)application-local.yaml profile for local PostgreSQL configKafkaTopicConfig: topic-1, topic-2 (2 partitions each)@Slf4j, @RequiredArgsConstructor, @Getter, @Setter)