项目优化,构建文件Lombok异常问题修复

This commit is contained in:
2026-06-29 13:55:42 +08:00
parent 53b3b2c989
commit 0799f9cb4d
47 changed files with 1034 additions and 865 deletions
+51 -43
View File
@@ -2,58 +2,66 @@
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Subdirectories have their own `CLAUDE.md` with module-specific details — see:
- `system-admin/CLAUDE.md` — backend build, patterns, conventions, weather domain
- `system-common/CLAUDE.md` — shared base classes, i18n
- `weather-data-ui/CLAUDE.md` — frontend stack, patterns, critical rules
## Project Overview
---
Weather data management system -- a multi-module Maven project with a Spring Boot backend and Vue 3 frontend for managing meteorological monitoring data from weather stations.
## Project overview
- **Backend**: Spring Boot 3.5.11, Java 17, Apache Shiro, MyBatis-Plus, Quartz
- **Frontend**: Vue 3 + TypeScript + Vite 5, Element Plus, ECharts, Pinia
- **Database**: MySQL 8.0 (primary), supports Oracle / SQL Server / PostgreSQL / Dameng via dynamic datasource
- **Cache**: Redis (Lettuce client)
**weather-data** is a full-stack meteorological data analysis platform: Java 17 / Spring Boot 3.5 multi-module backend + Vue 3 / Vite 5 / TypeScript frontend. Forked from [renren-security](https://gitee.com/renrenio/renren-security).
## Project Conventions
```
weather-data/
├── system-common/ → shared Java lib
├── system-admin/ → admin backend (port 8080, /system-admin)
├── system-dynamic-datasource → multi-DS routing via @DataSource annotation + AOP
├── renren-generator/ → code generator (commented out of build)
└── weather-data-ui/ → Vue 3 SPA frontend
- **No emoji**: Avoid using emoji in code (including variable names, comments, commit messages) and in response messages. Use plain text instead.
- **Keep CLAUDE.md files current**: Any operation that adds, deletes, or modifies files affecting project structure (new modules, new packages, renamed components, dependency changes, config changes, schema changes, etc.) must update the relevant CLAUDE.md file(s) -- top-level for cross-cutting changes, module-level for module-specific changes.
## Module Index
| Module | Path | Purpose |
|--------|------|---------|
| system-common | `system-common/` | Shared library: base classes, Redis, validation, XSS, utilities |
| system-dynamic-datasource | `system-dynamic-datasource/` | Multi-datasource support via AbstractRoutingDataSource |
| system-admin | `system-admin/` | Main Spring Boot application, REST API, jobs, security |
| weather-data-ui | `weather-data-ui/` | Vue 3 frontend |
Each module has its own `CLAUDE.md` with module-specific architecture and conventions. When working in a module, read that module's CLAUDE.md for context.
## Build & Run Commands
### Backend
```bash
# Build everything (skip tests)
mvn clean package -DskipTests
# Build only system-admin module
cd system-admin && mvn package -DskipTests
# Run with dev profile
cd system-admin && mvn spring-boot:run -Dspring-boot.run.profiles=dev
```
**Database**: `weather_data_system` (MySQL). Init from `system-admin/db/weather_data_system.sql` (includes schema + seed data). Default admin: `admin` / `admin` (BCrypt-encoded). Key custom tables: `weather_daily_data`, `weather_station`, `weather_file_scan_record`. No Flyway/Liquibase — all schema changes are manual SQL.
Main entry: `system-admin/src/main/java/com/weather/AdminApplication.java`
### Port & context path reference
### Frontend
| Service | Port | Context Path | App Class |
|---|---|---|---|
| Admin | 8080 | `/system-admin` | `AdminApplication` |
| Frontend (dev) | 8001 | `/` | Vite dev server |
| Frontend (prod) | 80 | `/` | Nginx via gateway |
```bash
cd weather-data-ui
npm install
npm run dev # dev server on port 8001
npm run build # production build
npm run lint # ESLint on src/**/*.{vue,ts}
```
---
### Docker Compose
## Code Style
```bash
docker compose up -d # MySQL + Redis + admin + api + UI + nginx gateway
```
- **No emoji in UI strings.** Plain Chinese text for labels, buttons, status. Functional Unicode symbols are allowed and used: status dots `●`/`○`, checkmark `✓`, and box-drawing chars (`╔ ═ ╗ ━`) in log banners.
- **No emoji in code comments or docstrings.** Plain text only.
- **Keep CLAUDE.md current** — whenever code is modified, added, deleted, or any file change affects the project structure, build process, architecture, or conventions, update the relevant `CLAUDE.md` in the same commit to reflect the new state. This file and its children are the source of truth for both humans and Claude; stale documentation is a bug.
## Key Configuration
---
## Docker deployment
Five services in `docker-compose.yml`: mysql (8.0), redis (7 Alpine + AOF), admin JAR, UI (Nginx + built frontend), gateway (Nginx reverse proxy on port 80). The `api` service definition still references the deleted `system-api` module — remove it before deploying.
**Important**: The `deploy/` directory referenced by Docker Compose (`deploy/mysql/init/`, `deploy/nginx/`) **does not exist locally** — it must be created for deployment.
Environment variables from `.env` at project root. Two frontend Dockerfiles: standard multi-stage (`Dockerfile`) and pre-built (`Dockerfile.offline`).
## Repository notes
- `README.md` does not contain substantive guidance — this file is the primary operational reference.
- No CI configuration exists. Only pre-commit is frontend lint-staged via yarn git hooks.
- `renren-generator` module exists but is commented out of the root POM build.
- `system-dynamic-datasource` provides `@DataSource` annotation-driven multi-DS routing; the slave DS config in `application-dev.yml` is commented out.
- `.gitignore` excludes `.idea/` but `.idea/` is tracked (committed IDE config; `.idea/.gitignore` only excludes local files like `workspace.xml`).
- **Dev profile**: `system-admin/src/main/resources/application-dev.yml` -- local MySQL (weather_data_system), Redis 127.0.0.1:6379
- **Prod profile**: `application-prod.yml` -- expects env variables for DB/Redis (see docker-compose.yml)
- **project-options.redis.open**: toggles Redis caching globally (set via sys_params)