springcamp

qihaiyan/springcamp Checked 1 day ago

30+ Standalone Spring Boot Practical Examples: Covering Spring AI/DeepSeek, MCP, Spring Security/OAuth2, Cloud Gateway, Kafka, Redis, GraalVM Native Image, and…

SpringCamp turns those Spring scenarios where "half a day of docs, a pile of blog posts, and you still can't do it" into minimal runnable examples: clone it, run it, tweak two lines and it clicks. It covers Spring AI, Spring Security / OAuth2, Spring Cloud, Data, messaging, caching, concurrency and more.

Summary extracted from the README.

SpringCamp 🏕️

English | 中文说明

30+ self-contained, runnable Spring Boot examples, each paired with a hands-on Chinese blog post on springcamp.cn. Not a pile of docs — working homework you can clone, run and copy from.

Apache-2.0 GitHub stars

What is this

SpringCamp turns those Spring scenarios where "half a day of docs, a pile of blog posts, and you still can't do it" into minimal runnable examples: clone it, run it, tweak two lines and it clicks. It covers Spring AI, Spring Security / OAuth2, Spring Cloud, Data, messaging, caching, concurrency and more.

Why use it

  • It runs: every module is a standalone Spring Boot project, not a code snippet.
  • It's documented: every example pairs with a hands-on article on springcamp.cn — code and principles together.
  • It's current: tracks new Spring Boot features (HTTP Interface, RestClient, Spring AI, MCP, ...).

How to run

git clone https://github.com/qihaiyan/springcamp.git
cd springcamp
./gradlew :<module>:bootRun        # see each module's README for details

Module index

Module What it does Blog
spring-ai-deepseek Spring AI + DeepSeek (chat / streaming / reasoning / function calling) post
spring-ai-htmx-chat Streaming AI chat UI with HTMX 4 + Alpine.js post
spring-ai-tanstack-chat Streaming AI chat UI with TanStack AI (React, AG-UI) —
spring-mcp Spring MCP (Model Context Protocol) server example —
spring-advanced-security Advanced Spring Security (custom login / auth) post
spring-cloud-gateway Spring Cloud Gateway dynamic routing post
spring-kafka Spring Kafka messaging (3 usage styles) post
spring-cache Spring Cache abstraction post
spring-aop Spring AOP aspects post
spring-data-flex-query Flexible Spring Data queries (SQL-injection safe) post
spring-data-jpa-multisource Spring Data JPA multiple datasources post
spring-dynamic-datasource Dynamic datasource switching post
spring-dynamic-scheduler Dynamic scheduled-task control post
spring-http-interface Spring Boot 3.2 declarative HTTP Interface post
spring-rest-client Spring Boot 3.2 RestClient post
spring-rest-template-log RestTemplate calls + DNS timeout config post
spring-rest-log-request-response REST request/response logging post
spring-modify-request-body Modify RequestBody in one place post
spring-sse Server-Sent Events push —
spring-native GraalVM native image post
spring-data-envers-conditional Conditional audit logging (Envers) post
spring-data-jdbc-client Spring Data JDBC Client (JdbcClient) post
spring-easy-rule Easy Rules rule engine post
spring-groovy Groovy dynamic scripts post
spring-redis-resolver Redis-backed cache resolver post
spring-localdatetime-epoch LocalDateTime ↔ epoch conversion post
spring-taskexecutor-block TaskExecutor deadlock demo post
spring-unit-test Spring unit testing post
elasticsearch-javaclient Elasticsearch Java client post
java-concurrency Java concurrency post
utils Common utilities —

Blog posts are written in Chinese. Full list at springcamp.cn.

Alt