gitmyhub

Spring-Boot-In-Action

Java ★ 4.7k updated 3y ago

Spring Boot 系列实战合集

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.

JavaSpring BootElasticsearchMyBatisDockerSpring SecurityKotlinsetup: moderatecomplexity 3/5

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.

Where it fits