How maliangnansheng/bbs-springboot works
Main Components
• bbs-rest: The entry point serving RESTful APIs. This module holds the controllers, configuration (e.g., exception interceptors, swagger, login filters), and provides the interface for the front‑end to communicate with the back‑end.
• bbs-article: The article management module. It is split into sub‑modules:
– bbs-article-facade: Contains DTOs (data transfer objects) and service interfaces meant for exposing article functions.
– bbs-article-persistence: Implements the data access layer using MyBatis, with mapper XML files and entity objects.
– bbs-article-service: Implements the business logic. It also holds configuration classes (like Dubbo, Redis, Mybatis, etc.) and uses MapStruct for data mapping.
• bbs-user: The user management module with a similar three‑layer split:
– bbs-user-facade: Exposes user-related APIs via DTOs and service interfaces.
– bbs-user-persistence: Contains the ORM entities/mappers and database access logic.
– bbs-user-service: Implements business logic and configurations, including scheduling (for asynchronous tasks) and integration of RPC (Dubbo) services.
• bbs-common: This module provides common utilities, configuration, constants, and enumeration definitions used across other modules.
• db: Contains sample database scripts and example JSON files or MongoDB collection setup scripts reflecting the underlying database layer.
Representing the Layered Architecture
• Facade (API contract layer with DTOs used by RPC or REST endpoints),
• Service (contains business logic, configurations like Dubbo, Mongo, Redis, etc.),
• Persistence (data access, MyBatis mappers, entity classes, and MyBatis XML mappings).
Infrastructure and External Services
• External components such as:
• Databases: MySQL for structured data (and possibly MongoDB for storing large data and document storage).
• Caching: Redis and Redisson used on the service layers.
• Messaging/Queue: RocketMQ for asynchronous messaging tasks.
• RPC infrastructure: Dubbo framework and Zookeeper (for service registry/configuration) as part of the microservices integration.
• Object storage: A block representing third‑party cloud storage (like Qiniu Cloud as mentioned).
Interactions Between Components
• API requests coming into bbs-rest, which then invoke methods from bbs-article and bbs-user’s façade layers.
• The service layer in each module communicating with the persistence layer to perform CRUD operations.
• The persistence layer interacting with the underlying databases.
• Integration points where bbs-common is shared across modules.
• Communication between different modules using RPC (Dubbo) configurations, if applicable.
• Any asynchronous communication that might occur through RocketMQ.
Architectural Patterns and Design Principles
• The separation of concerns is evident in the layered architecture (facade, service, persistence).
• Microservices/integration patterns via Dubbo (with Zookeeper for registration) should be highlighted.
• RESTful design in bbs-rest and the decoupling between client (Vue front‑ends) and server (SpringBoot).