explaingit

hansonwang99/spring-boot-in-action

4,681JavaAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Chinese tutorial series with runnable Spring Boot code examples covering databases, caching, monitoring, security, and integrations, written to accompany blog articles by the author CodeSheep.

Mindmap

mindmap
  root((Spring Boot In Action))
    Topics
      Databases and caching
      Application monitoring
      Security and SSO
      Docker packaging
    Tech stack
      Java
      Spring Boot
      MyBatis
      Elasticsearch
      Spring Security
    Extras
      Kotlin examples
      Custom starters
      Unique ID generation
    Audience
      Java developers
      Chinese learners
    Use cases
      Learn Spring Boot
      Production patterns
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Follow the tutorial articles to learn how to connect Spring Boot to MySQL using MyBatis, with working sample code you can run immediately.

USE CASE 2

Set up Spring Boot Admin and BTrace monitoring for a running Java application using the examples in the monitoring section.

USE CASE 3

Build a JWT-based single sign-on system across multiple Spring Boot services using the security and authentication examples.

Tech stack

JavaSpring BootElasticsearchMyBatisDockerSpring SecurityKotlin

Getting it running

Difficulty · moderate Time to first run · 30min

Most examples require a running database or external service, all tutorial articles are written in Chinese.

In plain English

This repository is a collection of code examples and companion articles for a Chinese tutorial series called Spring Boot In Action. Spring Boot is a popular Java framework that makes it faster to build web applications and backend services. The author, who runs a blog and a WeChat public account called CodeSheep, publishes each tutorial article first through those channels and keeps the code in this repo continuously updated. The collection is organized by topic. The database and caching section covers how to connect Spring Boot to various storage systems, including Elasticsearch for search, MyBatis for relational databases (including SQL Server), and several caching libraries like Ehcache and Guava Cache. There is also a section on generating unique IDs for distributed applications, which matters when multiple servers need to create records without collision. Another group of examples covers application monitoring, showing how to use Spring Boot Admin and a tool called BTrace to inspect a running application in production. A section on internal mechanics explains how Spring Boot starts up, how its core annotation works behind the scenes, and how to build a custom Spring Boot starter (a reusable configuration module that other projects can import). Security and authentication examples show how to set up permission systems using Spring Security combined with JWT tokens, including a single sign-on setup where one login works across multiple services. The practical section includes smaller how-to examples: packaging a Spring Boot app inside Docker, uploading images and adding watermarks, using a Chinese natural language processing library called HanLP, and combining Spring Boot with the Kotlin programming language. The repository lists the articles as links, most point to the author's blog or to subdirectories within this repo that contain the actual runnable code. The series is marked as ongoing and continues to grow.

Copy-paste prompts

Prompt 1
Using the spring-boot-in-action pattern, write a Spring Boot starter module for JWT authentication that other projects can import as a Maven dependency.
Prompt 2
Show me how to set up Spring Boot Admin to monitor a running service and configure email alerts when a health check fails.
Prompt 3
Translate the MyBatis plus SQL Server example from spring-boot-in-action into a PostgreSQL version with Flyway migrations.
Prompt 4
Set up Elasticsearch full-text search in a Spring Boot app following the spring-boot-in-action pattern, including index creation and a basic query.
Open on GitHub → Explain another repo

← hansonwang99 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.