# mall | macro | Knowledge Base | Instagit

mall项目是一套电商系统，包括前台商城系统及后台管理系统，基于Spring Boot+MyBatis实现，采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。

GitHub Stars: 83k

Repository: https://github.com/macrozheng/mall

---

## Articles

### [How to Optimize Performance Using Redis and MongoDB in the Mall E-Commerce Project](/macrozheng/mall/how-to-optimize-performance-using-redis-and-mongodb)

Optimize your e-commerce project performance with Redis and MongoDB. Discover how this hybrid architecture accelerates data retrieval and handles heavy write loads effectively.

- Tags: performance
- Published: 2026-02-28

### [How to Add Custom Validation Rules for Admin Inputs in the Mall Project](/macrozheng/mall/how-to-add-custom-validation-rules-for-admin-inputs)

Learn to add custom validation rules for admin inputs in the Mall project. Implement ConstraintValidator and use @Validated annotation. Ensure data integrity before business logic.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Implement Frontend-Backend API Integration in the Mall Project](/macrozheng/mall/how-to-implement-frontend-backend-api-integration)

Learn how to implement frontend-backend API integration in the Mall project using JWT authentication. Securely store and attach tokens for seamless communication.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Configure Database Connection Pooling with Druid in the Mall Project](/macrozheng/mall/how-to-configure-database-connection-pooling-with-druid)

Configure database connection pooling with Druid in the Mall project using Spring Boot YAML. Achieve high-performance database connectivity and built-in monitoring for your microservices.

- Tags: how-to-guide
- Published: 2026-02-28

### [Multi-Tenant Support in the Mall E-Commerce Platform: Architecture and Implementation Options](/macrozheng/mall/what-is-the-approach-to-multi-tenant-support-in-the-system)

Explore multi-tenant support options for the Mall e-commerce platform. Learn about architectural approaches and implementation strategies to enhance scalability and resource utilization.

- Tags: architecture
- Published: 2026-02-28

### [How to Extend the Backend with New Modules in the Mall Project](/macrozheng/mall/how-to-extend-the-backend-with-new-modules)

Easily extend the Mall backend with new modules. Learn to create Maven submodules, register them in pom.xml, and implement Spring Boot applications for new features.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Deploy the Mall Project with Docker and Docker Compose: A Complete Guide](/macrozheng/mall/how-to-deploy-mall-project-with-docker-and-docker-compose)

Easily deploy the macrozheng mall e-commerce project using Docker and Docker Compose. This guide helps you set up MySQL Redis Elasticsearch and Spring Boot microservices in minutes.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Implement an Order Returns and Refunds Workflow in the Mall E-Commerce System](/macrozheng/mall/how-to-handle-order-returns-and-refunds-workflow)

Learn how to implement order returns and refunds workflow in the Mall e-commerce system. Discover the state-driven process using four statuses and OmsOrderReturnApply entities.

- Tags: how-to-guide
- Published: 2026-02-28

### [How Shopping Cart Persistence Works in the macrozheng/mall E-Commerce System](/macrozheng/mall/how-does-the-shopping-cart-persistence-work)

Discover how shopping cart persistence works in macrozheng/mall. Learn about MyBatis database operations, soft-delete logic, and duplicate detection in OmsCartItemServiceImpl.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Configure Swagger/OpenAPI Documentation in the Mall Project](/macrozheng/mall/how-to-configure-swagger-openapi-documentation)

Learn to configure Swagger OpenAPI documentation in the macrozheng mall project by extending BaseSwaggerConfig and customizing SwaggerProperties for each module.

- Tags: how-to-guide
- Published: 2026-02-28

### [How the Member Level and Points System Works in the Mall E-Commerce Platform](/macrozheng/mall/how-does-the-member-level-and-points-system-work)

Discover how the Mall member level and points system boosts loyalty with automatic upgrades for consumption, sign-ins, and tasks, unlocking shipping discounts and exclusive promotions.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Implement Product Attribute and Category Management in the Mall Project](/macrozheng/mall/how-to-implement-product-attribute-and-category-management)

Learn to implement product attribute and category management using Spring Boot REST endpoints MyBatis services and DAO layers for efficient e-commerce operations in the Mall project.

- Tags: how-to-guide
- Published: 2026-02-28

### [How the Coupon and Voucher System Works in the Mall Project: A Complete Technical Guide](/macrozheng/mall/how-does-the-coupon-and-voucher-system-work)

Explore the coupon and voucher system in the Mall project. Learn how it manages discounts across data, admin, and portal layers with automatic rollback for order cancellations.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Configure RabbitMQ Message Queues for Order Processing in the Mall Project](/macrozheng/mall/how-to-configure-rabbitmq-message-queues-for-order-processing)

Learn to configure RabbitMQ message queues for order processing in the Mall project. Implement reliable async event handling with Spring AMQP TTL dead-letter queues.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use MyBatis Generator to Generate Database Access Code in the Mall Project](/macrozheng/mall/how-to-use-mybatis-generator-to-generate-database-access-code)

Automate database access code generation with MyBatis Generator in the mall project. This guide shows how to create model classes, mappers, and XML mappings using a simple Maven command.

- Tags: how-to-guide
- Published: 2026-02-28

### [How the Flash Sale and Promotion System Works in macrozheng/mall: A Technical Deep Dive](/macrozheng/mall/how-does-the-flash-sale-and-promotion-system-work)

Explore the flash sale and promotion system in macrozheng/mall. Understand its three-tier hierarchy Promotion Session Product Relation and how it delivers time-bound discounts.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Integrate Third-Party Payment Like Alipay in the Mall Project](/macrozheng/mall/how-to-integrate-third-party-payment-alipay)

Learn how to integrate Alipay into your Mall project. Follow this guide to add the SDK, configure credentials, and implement payment logic for seamless transactions.

- Tags: how-to-guide
- Published: 2026-02-28

### [How the Order Workflow and State Machine Work in Mall (macrozheng/mall)](/macrozheng/mall/how-does-the-order-workflow-and-state-machine-work)

Explore the order workflow and state machine in the macrozheng/mall e-commerce platform. Understand how the integer status field and service methods manage order transitions from pending payment to invalid.

- Tags: internals
- Published: 2026-02-28

### [How to Customize Aliyun OSS File Upload Configuration in the Mall Project](/macrozheng/mall/how-to-customize-aliyun-oss-file-upload-configuration)

Customize Aliyun OSS file upload configuration easily in the Mall project. Modify endpoints, credentials, and policies in application.yml without changing code.

- Tags: how-to-guide
- Published: 2026-02-28

### [How Elasticsearch Product Search Works in the mall‑search Module](/macrozheng/mall/how-does-elasticsearch-product-search-work-in-mall-search-module)

Explore how Elasticsearch product search powers the mall-search module. Learn about data synchronization from MySQL, REST endpoint functionality, and advanced search capabilities. Optimize your e-commerce search today.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Configure Redis Caching for Admin User Sessions in the Mall Project](/macrozheng/mall/how-to-configure-redis-caching-for-admin-user-sessions)

Configure Redis caching for admin user sessions in the mall project. Optimize stateless JWT sessions by caching user details and permissions, reducing database lookups.

- Tags: how-to-guide
- Published: 2026-02-28

### [How the Spring Security RBAC Permission System Works in mall-admin](/macrozheng/mall/how-does-springsecurity-rbac-permission-system-work-in-mall-admin)

Discover how the mall-admin Spring Security RBAC permission system dynamically manages user access. Learn how URL permissions are loaded from the database and refreshed without server restarts.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Implement JWT Authentication and Token Refresh in the Mall Project](/macrozheng/mall/how-to-implement-jwt-authentication-and-token-refresh-in-mall-project)

Learn to implement JWT authentication and token refresh in the mall project. Discover how Spring Security, JwtTokenUtil, and JwtAuthenticationTokenFilter secure your API with HS512 tokens and a 30-minute refresh window.

- Tags: how-to-guide
- Published: 2026-02-28

