mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 16:06:36 +08:00
1.6 KiB
1.6 KiB
SPRINGBOOT BACKEND KNOWLEDGE BASE
Generated: Mon Feb 02 2026
OVERVIEW
Admin API for Flux Panel. Manages users, tunnels, nodes, forwards, quotas, and speed limits. Stack: Java 21, Spring Boot 2.7.18, SQLite, MyBatis Plus (+ join), FastJSON2.
STRUCTURE
springboot-backend/
├── src/main/java/com/admin/
│ ├── controller/ # /api/v1/* endpoints
│ ├── entity/ # DB models
│ ├── mapper/ # MyBatis Plus mappers
│ ├── service/ # Business logic
│ ├── config/ # WebMvc/JWT/CORS/WebSocket config
│ └── common/ # DTOs, auth, exception handling, utilities
└── src/main/resources/
├── application.yml # Config (DB_PATH/JWT_SECRET/LOG_DIR)
├── mapper/ # XML mappers
├── schema.sql # Schema
└── data.sql # Seed data
CONVENTIONS
- DB: SQLite URL is
jdbc:sqlite:${DB_PATH:/app/data/gost.db}(springboot-backend/src/main/resources/application.yml). - Auth: JWT in
Authorizationheader; enforced bycom.admin.common.interceptor.JwtInterceptorfor/api/**(with explicit excludes incom.admin.config.WebMvcConfig). - Roles:
@RequireRolemeans admin-only (role_id == 0) viacom.admin.common.aop.RoleAspect. - Responses: Controllers return
com.admin.common.lang.R(code == 0success). - CORS: Allow-all origins;
Authorizationis exposed (com.admin.config.WebMvcConfig).
COMMANDS
cd springboot-backend
mvn clean package
mvn test
java -jar target/admin-0.0.1-SNAPSHOT.jar