# liufe/springboot-learning architecture

> Architecture diagram of the GitHub repository liufe/springboot-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/liufe/springboot-learning
- Repository: https://github.com/liufe/springboot-learning

## Overview

This repository is a collection of Spring Boot and Spring Cloud tutorial samples, not one deployable application. A learner selects an example and observes its demonstrated behavior, from configuration and REST endpoints through persistence, messaging, background work, and service-to-service patterns. The graph preserves those distinct tutorial branches rather than joining them into a runtime pipeline. Internal links are limited to relationships visible in excerpts or the source index; README links identify documented capabilities, not implementation details.

Main entry points: [`Chapter2-2-1/src/main/java/com/didispace`](https://github.com/liufe/springboot-learning/tree/master/Chapter2-2-1/src/main/java/com/didispace) (Typed binding), [`Chapter3-1-1/src/main/java/com/didispace/web/UserController.java`](https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-1/src/main/java/com/didispace/web/UserController.java) (REST endpoints), [`Chapter9-1-2/eureka-feign/src/main/java/com/didispace/web/ConsumerController.java`](https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-2/eureka-feign/src/main/java/com/didispace/web/ConsumerController.java) (Feign consumer), [`Chapter2-1-1/src/main/java/com/didispace`](https://github.com/liufe/springboot-learning/tree/master/Chapter2-1-1/src/main/java/com/didispace) (Property binding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and configuration"]
  node_boot_basics["Boot starter"]
  node_properties["Property binding"]
  node_events["Application events"]
  node_binding2["Typed binding"]
end

subgraph group_web["Web APIs"]
  node_rest["REST endpoints"]
  node_user_model["User model<br/>[User.java]"]
  node_views["View rendering"]
  node_swagger["API documentation<br/>[Swagger2.java]"]
  node_error_handling["Error handling"]
end

subgraph group_data["Data access"]
  node_jdbc["JDBC access"]
  node_jpa["JPA repositories"]
  node_multi_db[("Multiple databases")]
  node_redis[("Redis integration")]
  node_mybatis["MyBatis mapping"]
  node_transactions["Transactions<br/>[UserService.java]"]
end

subgraph group_runtime["Runtime features"]
  node_async["Async tasks<br/>[Task.java]"]
  node_logging["Request logging<br/>[WebLogAspect.java]"]
  node_security["Web security"]
  node_rabbit["Rabbit messaging"]
  node_state_machine["State machine"]
end

subgraph group_cloud["Cloud services"]
  node_eureka["Service discovery<br/>[Application.java]"]
  node_compute_api["Compute service"]
  node_feign_consumer["Feign consumer"]
  node_feign_client["Feign client<br/>[ComputeClient.java]"]
  node_gateway["API gateway"]
  node_config_server["Config server<br/>[Application.java]"]
  node_dubbo["Dubbo examples"]
end

node_learner(("Learner"))

node_learner -->|"studies"| node_boot_basics
node_learner -->|"studies"| node_properties
node_learner -->|"studies"| node_events
node_learner -->|"studies"| node_binding2
node_learner -->|"studies"| node_rest
node_learner -->|"studies"| node_views
node_learner -->|"studies"| node_swagger
node_learner -->|"studies"| node_error_handling
node_learner -->|"studies"| node_jdbc
node_learner -->|"studies"| node_jpa
node_learner -->|"studies"| node_multi_db
node_learner -->|"studies"| node_redis
node_learner -->|"studies"| node_mybatis
node_learner -->|"studies"| node_transactions
node_learner -->|"studies"| node_async
node_learner -->|"studies"| node_logging
node_learner -->|"studies"| node_security
node_learner -->|"studies"| node_rabbit
node_learner -->|"studies"| node_state_machine
node_learner -->|"studies"| node_eureka
node_learner -->|"studies"| node_compute_api
node_learner -->|"studies"| node_feign_consumer
node_learner -->|"studies"| node_gateway
node_learner -->|"studies"| node_config_server
node_learner -->|"studies"| node_dubbo
node_rest -->|"uses model"| node_user_model
node_feign_consumer -->|"calls"| node_feign_client
node_binding2 -->|"binds settings"| node_properties

click node_boot_basics "https://github.com/liufe/springboot-learning/tree/master/Chapter1/src/main/java/com/didispace"
click node_properties "https://github.com/liufe/springboot-learning/tree/master/Chapter2-1-1/src/main/java/com/didispace"
click node_events "https://github.com/liufe/springboot-learning/tree/master/Chapter2-1-2/src/main/java/com/didispace"
click node_binding2 "https://github.com/liufe/springboot-learning/tree/master/Chapter2-2-1/src/main/java/com/didispace"
click node_rest "https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-1/src/main/java/com/didispace/web/UserController.java"
click node_user_model "https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-1/src/main/java/com/didispace/domain/User.java"
click node_views "https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-2/src/main/java/com/didispace/web/HelloController.java"
click node_swagger "https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-5/src/main/java/com/didispace/Swagger2.java"
click node_error_handling "https://github.com/liufe/springboot-learning/tree/master/Chapter3-1-6/src/main/java/com/didispace/exception"
click node_jdbc "https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-1/src/main/java/com/didispace/service"
click node_jpa "https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-2/src/main/java/com/didispace/domain"
click node_multi_db "https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-4/src/main/java/com/didispace"
click node_redis "https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-5/src/main/java/com/didispace"
click node_mybatis "https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-7/src/main/java/com/didispace/domain"
click node_transactions "https://github.com/liufe/springboot-learning/blob/master/Chapter3-3-1/src/main/java/com/didispace/service/UserService.java"
click node_async "https://github.com/liufe/springboot-learning/blob/master/Chapter4-1-2/src/main/java/com/didispace/async/Task.java"
click node_logging "https://github.com/liufe/springboot-learning/blob/master/Chapter4-2-4/src/main/java/com/didispace/aspect/WebLogAspect.java"
click node_security "https://github.com/liufe/springboot-learning/blob/master/Chapter4-3-1/src/main/java/com/didispace/WebSecurityConfig.java"
click node_rabbit "https://github.com/liufe/springboot-learning/tree/master/Chapter5-2-1/src/main/java/com/didispace/rabbit"
click node_state_machine "https://github.com/liufe/springboot-learning/tree/master/Chapter6-1-1/src/main/java/com/didispace"
click node_eureka "https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-1/eureka-server/src/main/java/com/didispace/Application.java"
click node_compute_api "https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-1/compute-service/src/main/java/com/didispace/web/ComputeController.java"
click node_feign_consumer "https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-2/eureka-feign/src/main/java/com/didispace/web/ConsumerController.java"
click node_feign_client "https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-2/eureka-feign/src/main/java/com/didispace/service/ComputeClient.java"
click node_gateway "https://github.com/liufe/springboot-learning/tree/master/Chapter9-1-5/api-gateway/src/main/java/com/didispace"
click node_config_server "https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-4/config-server/src/main/java/com/didispace/Application.java"
click node_dubbo "https://github.com/liufe/springboot-learning/tree/master/Chapter9-2-1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_boot_basics,node_properties,node_events,node_binding2 toneBlue
class node_rest,node_user_model,node_views,node_swagger,node_error_handling toneAmber
class node_jdbc,node_jpa,node_multi_db,node_redis,node_mybatis,node_transactions toneMint
class node_async,node_logging,node_security,node_rabbit,node_state_machine toneRose
class node_eureka,node_compute_api,node_feign_consumer,node_feign_client,node_gateway,node_config_server,node_dubbo,node_learner toneIndigo
```

## Components

### Boot and configuration

- [Boot starter](https://github.com/liufe/springboot-learning/tree/master/Chapter1/src/main/java/com/didispace): `Chapter1/src/main/java/com/didispace`
- [Property binding](https://github.com/liufe/springboot-learning/tree/master/Chapter2-1-1/src/main/java/com/didispace): `Chapter2-1-1/src/main/java/com/didispace`
- [Application events](https://github.com/liufe/springboot-learning/tree/master/Chapter2-1-2/src/main/java/com/didispace): `Chapter2-1-2/src/main/java/com/didispace`
- [Typed binding](https://github.com/liufe/springboot-learning/tree/master/Chapter2-2-1/src/main/java/com/didispace): `Chapter2-2-1/src/main/java/com/didispace`

### Web APIs

- [REST endpoints](https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-1/src/main/java/com/didispace/web/UserController.java): `Chapter3-1-1/src/main/java/com/didispace/web/UserController.java`
- [User model](https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-1/src/main/java/com/didispace/domain/User.java): `Chapter3-1-1/src/main/java/com/didispace/domain/User.java`
- [View rendering](https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-2/src/main/java/com/didispace/web/HelloController.java): `Chapter3-1-2/src/main/java/com/didispace/web/HelloController.java`
- [API documentation](https://github.com/liufe/springboot-learning/blob/master/Chapter3-1-5/src/main/java/com/didispace/Swagger2.java): `Chapter3-1-5/src/main/java/com/didispace/Swagger2.java`
- [Error handling](https://github.com/liufe/springboot-learning/tree/master/Chapter3-1-6/src/main/java/com/didispace/exception): `Chapter3-1-6/src/main/java/com/didispace/exception`

### Data access

- [JDBC access](https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-1/src/main/java/com/didispace/service): `Chapter3-2-1/src/main/java/com/didispace/service`
- [JPA repositories](https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-2/src/main/java/com/didispace/domain): `Chapter3-2-2/src/main/java/com/didispace/domain`
- [Multiple databases](https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-4/src/main/java/com/didispace): `Chapter3-2-4/src/main/java/com/didispace`
- [Redis integration](https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-5/src/main/java/com/didispace): `Chapter3-2-5/src/main/java/com/didispace`
- [MyBatis mapping](https://github.com/liufe/springboot-learning/tree/master/Chapter3-2-7/src/main/java/com/didispace/domain): `Chapter3-2-7/src/main/java/com/didispace/domain`
- [Transactions](https://github.com/liufe/springboot-learning/blob/master/Chapter3-3-1/src/main/java/com/didispace/service/UserService.java): `Chapter3-3-1/src/main/java/com/didispace/service/UserService.java`

### Runtime features

- [Async tasks](https://github.com/liufe/springboot-learning/blob/master/Chapter4-1-2/src/main/java/com/didispace/async/Task.java): `Chapter4-1-2/src/main/java/com/didispace/async/Task.java`
- [Request logging](https://github.com/liufe/springboot-learning/blob/master/Chapter4-2-4/src/main/java/com/didispace/aspect/WebLogAspect.java): `Chapter4-2-4/src/main/java/com/didispace/aspect/WebLogAspect.java`
- [Web security](https://github.com/liufe/springboot-learning/blob/master/Chapter4-3-1/src/main/java/com/didispace/WebSecurityConfig.java): `Chapter4-3-1/src/main/java/com/didispace/WebSecurityConfig.java`
- [Rabbit messaging](https://github.com/liufe/springboot-learning/tree/master/Chapter5-2-1/src/main/java/com/didispace/rabbit): `Chapter5-2-1/src/main/java/com/didispace/rabbit`
- [State machine](https://github.com/liufe/springboot-learning/tree/master/Chapter6-1-1/src/main/java/com/didispace): `Chapter6-1-1/src/main/java/com/didispace`

### Cloud services

- [Service discovery](https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-1/eureka-server/src/main/java/com/didispace/Application.java): `Chapter9-1-1/eureka-server/src/main/java/com/didispace/Application.java`
- [Compute service](https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-1/compute-service/src/main/java/com/didispace/web/ComputeController.java): `Chapter9-1-1/compute-service/src/main/java/com/didispace/web/ComputeController.java`
- [Feign consumer](https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-2/eureka-feign/src/main/java/com/didispace/web/ConsumerController.java): `Chapter9-1-2/eureka-feign/src/main/java/com/didispace/web/ConsumerController.java`
- [Feign client](https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-2/eureka-feign/src/main/java/com/didispace/service/ComputeClient.java): `Chapter9-1-2/eureka-feign/src/main/java/com/didispace/service/ComputeClient.java`
- [API gateway](https://github.com/liufe/springboot-learning/tree/master/Chapter9-1-5/api-gateway/src/main/java/com/didispace): `Chapter9-1-5/api-gateway/src/main/java/com/didispace`
- [Config server](https://github.com/liufe/springboot-learning/blob/master/Chapter9-1-4/config-server/src/main/java/com/didispace/Application.java): `Chapter9-1-4/config-server/src/main/java/com/didispace/Application.java`
- [Dubbo examples](https://github.com/liufe/springboot-learning/tree/master/Chapter9-2-1): `Chapter9-2-1`

### Other components

- **Learner**

## Connections

- Learner → Boot starter: studies (evidence: `README.md`)
- Learner → Property binding: studies (evidence: `README.md`)
- Learner → Application events: studies (evidence: `README.md`)
- Learner → Typed binding: studies (evidence: `README.md`)
- Learner → REST endpoints: studies (evidence: `README.md`)
- Learner → View rendering: studies (evidence: `README.md`)
- Learner → API documentation: studies (evidence: `README.md`)
- Learner → Error handling: studies (evidence: `README.md`)
- Learner → JDBC access: studies (evidence: `README.md`)
- Learner → JPA repositories: studies (evidence: `README.md`)
- Learner → Multiple databases: studies (evidence: `README.md`)
- Learner → Redis integration: studies (evidence: `README.md`)
- Learner → MyBatis mapping: studies (evidence: `README.md`)
- Learner → Transactions: studies (evidence: `README.md`)
- Learner → Async tasks: studies (evidence: `README.md`)
- Learner → Request logging: studies (evidence: `README.md`)
- Learner → Web security: studies (evidence: `README.md`)
- Learner → Rabbit messaging: studies (evidence: `README.md`)
- Learner → State machine: studies (evidence: `README.md`)
- Learner → Service discovery: studies (evidence: `README.md`)
- Learner → Compute service: studies (evidence: `README.md`)
- Learner → Feign consumer: studies (evidence: `README.md`)
- Learner → API gateway: studies (evidence: `README.md`)
- Learner → Config server: studies (evidence: `README.md`)
- Learner → Dubbo examples: studies (evidence: `README.md`)
- REST endpoints → User model: uses model (evidence: `Chapter3-1-1/src/main/java/com/didispace/web/UserController.java`)
- Feign consumer → Feign client: calls (evidence: `Chapter9-1-2/eureka-feign/src/main/java/com/didispace/web/ConsumerController.java`)
- Typed binding → Property binding: binds settings (evidence: `Chapter2-2-1/src/main/java/com/didispace/Application.java`)
