# 基于springboot+vue实现的易物校园系统-java后端 **Repository Path**: xyhfox/transaction-java ## Basic Information - **Project Name**: 基于springboot+vue实现的易物校园系统-java后端 - **Description**: 基于springboot+vue实现的易物校园物品交易系统 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2023-11-01 - **Last Updated**: 2026-08-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Campus Second-Hand Trading Platform - Backend (transaction-java) "易物校园" (Campus Barter) is a second-hand goods trading platform for college campuses, featuring product listing and trading, order management, online payment, built-in chat, and admin management. This repository is the **backend API service**. ## Project Structure The whole platform consists of three repositories. **Deploy the backend first, then the front-ends:** | Repository | Role | Default Port | Tech Stack | | --- | --- | --- | --- | | [transaction-java](https://gitee.com/xyhfox/transaction-java) | Backend API (this repo) | 8080 | Spring Boot + MyBatis | | [transaction-vue-admin](https://gitee.com/xyhfox/transaction-vue-admin) | Admin frontend | 8848 | Vue3 + TypeScript + Vite | | [transaction-vue-client](https://gitee.com/xyhfox/transaction-vue-client) | User-facing frontend | 5173 | Vue3 + Vite | ``` ┌────────────────────┐ ┌────────────────────┐ │ transaction-vue- │ │ transaction-vue- │ │ admin (admin panel)│ │ client (user side) │ └─────────┬──────────┘ └─────────┬──────────┘ └───────────┬────────────┘ ▼ ┌────────────────────────┐ │ transaction-java │ │ (Spring Boot API) │ └───────┬─────────┬─────┘ ▼ ▼ MySQL Redis (optional: Meilisearch / COS / email) ``` ## Tech Stack - Framework: Spring Boot 2.x - ORM: MyBatis (+ MyBatis-Plus, PageHelper pagination) - Database: MySQL 5.7+ - Cache: Redis - Search: Meilisearch (optional, toggle via `meilisearch.enabled`) - Security: Spring Security + JWT - Payment: Alipay Sandbox - Storage: Tencent Cloud COS (or local storage via `image.enableLocal`) - Email: JavaMail SMTP (optional, toggle via `email.enabled`) - API docs: Swagger - Realtime: WebSocket (STOMP) ## Requirements - JDK 1.8+ - Maven 3.x - MySQL 5.7+ - Redis 3.0+ ## Quick Start (Local) ### 1. Initialize the database ```bash mysql -uroot -p -e "CREATE DATABASE yw_school DEFAULT CHARACTER SET utf8mb4;" mysql -uroot -p yw_school < dbsql/yw_school.sql ``` > `dbsql/yw_school.sql` contains 20 tables with sample/test accounts (see the `t_user` table). ### 2. Configure The bundled config files are sanitized - **fill in your own credentials**. For local development, switch the profile to `dev` in `application.yml`: ```yaml spring: profiles: active: dev # dev = local / prod = production ``` Then update your database password etc. in `application-dev.yml`. ### 3. Run ```bash mvn clean package -Dmaven.test.skip=true java -jar target/transaction-0.0.1-SNAPSHOT.jar ``` - Swagger docs: http://localhost:8080/swagger-ui.html - Default port: **8080** ## Config Files | File | Description | | --- | --- | | `application.yml` | Selects the active profile (`dev` / `prod`) | | `application-dev.yml` | Local development config | | `application-prod.yml` | Production config (DB, Alipay, COS, email) | | `log4j2.yml` | Logging config | ## Feature Modules - **User**: register / login / JWT auth / RBAC permissions (roles, menus, buttons, API) - **Product**: publish / edit / on-off shelf / categories / search / recommendations - **Trading**: cart / orders / payment (Alipay sandbox) / refunds / statistics - **Extras**: built-in chat (WebSocket) / image & file upload / email notifications / charts ## License MIT License.