How baka-world/bbs-springboot works
a. Facade Layer (bbs-article-facade):
• This module defines the DTOs and service interfaces exposed to clients.
b. Business/Service Layer (bbs-article-service):
• Contains the Spring Boot application startup, controller classes (REST endpoints), configuration classes (for MyBatis, Redis, Dubbo, MongoDB, etc.), service implementations, scheduler tasks, interceptors, and mapstruct converters.
c. Persistence Layer (bbs-article-persistence):
• Responsible for database interactions using MyBatis via Mapper interfaces, Entities, and XML mapper configuration files.
• It as “Data Access Layer” or “Persistence Layer.”
d. Common Module (bbs-common):
• Contains shared configurations, constants, enums, and utilities.
External/infrastructure components
• External databases like MySQL and MongoDB (as specified in the README and configuration files).
• A Redis cache component.
• Registration and RPC framework with Dubbo and Zookeeper.
• Optionally, include RocketMQ for messaging if further details about its use are found in the configurations.
• Integration points for external object storage (七牛云) and WebSocket for real-time communication.
• From the service layer, indicate calls toward the “Persistence Layer” for CRUD operations.
Architectural design principles
• Modularization: separate modules for facade, service, and persistence encourage a clean separation of concerns.
• Use of industry best practices—such as dependency injection configuration in Spring Boot, declarative transaction management (likely within MyBatis configuration), and the use of interceptors for cross-cutting concerns (as seen in the interceptors directory).
• Use of mapstruct for DTO conversion, which helps decouple internal entities from externally exposed DTOs.
• The project employs a microservices/RPC approach (via Dubbo) even within its modular structure, so show how internal services may also expose or consume remote services.