WanMall is a modern e-commerce platform built with the Aero framework. It provides a complete online shopping experience with user management, product browsing, shopping cart, order processing, and payment features.
- User registration and authentication system
- Product browsing and searching
- Shopping cart functionality
- Order creation and payment processing
- User profile and address management
- Product reviews and comments
- Favorite items management
- Framework: Aero Framework 1.0.3
- Language: Java
- Database: MySQL (JDBC)
- Build Tool: Gradle
- Architecture: MVC with layered architecture (Controller, Service, Repository)
- Dependency Injection: Built-in Aero DI system
- ORM: Custom repository pattern implementation
WanMall follows a clean architecture pattern with the following layers:
- Controller Layer: Handles HTTP requests and responses
- Service Layer: Contains business logic
- Repository Layer: Handles database operations
- Model Layer: Contains DTOs, Entities, and VO objects
- Auth Module: User authentication and registration
- User Module: Profile management, addresses, favorites
- Goods Module: Product browsing, searching, categorization
- Shop Module: Shopping cart, order processing, payment
- Clone the repository
- Install MySQL and create a database named
wanmall - Update database credentials in
src/main/resources/application.properties:database.url=jdbc:mysql://localhost:3306/wanmall database.driver=com.mysql.cj.jdbc.Driver database.username=your_username database.password=your_password server.port=8080 - Build the project:
./gradlew build - Run the application:
java -jar build/libs/wanmall-1.0-SNAPSHOT-all.jar
POST /auth/login- User loginPOST /auth/register- User registration
GET /goods/recommend- Get recommended productsGET /goods/get/{id}- Get product by IDGET /goods/get/{id}/comments- Get product commentsGET /goods/search?kw={keyword}- Search productsGET /goods/classify?type={type}- Get products by category
POST /user/addr/setdef/{id}- Set default addressPOST /user/addr/add- Add new addressPOST /user/addr/remove/{id}- Remove addressPOST /user/addr/update/{id}- Update addressGET /user/addr- Get user addressesPOST /user/nickname/update- Update nicknamePOST /user/password/update- Update passwordPOST /user/avatar/update- Update avatar
POST /shop/cart/add/{id}- Add item to cartPOST /shop/cart/sub/{id}- Remove one item from cartPOST /shop/cart/remove/{id}- Remove all items of a product from cartPOST /shop/order/create- Create orderPOST /shop/order/pay- Pay for order
The application requires a MySQL database with the following main tables:
- Users (user information)
- Goods (product information)
- UserCart (shopping cart entries)
- Orders (order information)
- GoodsComments (product reviews)
- UserAddr (user addresses)
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
WanMall is built with the Aero Framework, a lightweight Java web framework that provides:
- Annotation-based routing
- Dependency injection
- ORM capabilities
- Request/response handling
- Modular architecture support
For more information about the framework, please check the Aero repository.