CLAUDE.md
jeecg-boot/CLAUDE.mdCLAUDE.md
Quality
89/100
Scores the file, not the repository.Length
818 words
17 headings · 3 code blocksRepository
47k
— · pushed 5 days agoLast changed
3 days ago
First indexed 3 days ago.1# CLAUDE.md23> You should always answer questions in Simplified Chinese first, unless the user explicitly requests another language.45This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.67## Project Overview89JeecgBoot 3.9.3 — a Java low-code development platform built on **Spring Boot 4.1.0**, **Java 17** (also supports 21, 24). It runs as a monolithic app by default, with an optional Spring Cloud microservices mode. Uses `jakarta` namespace (not `javax`) throughout.1011## Build & Run Commands1213```bash14# Full build (tests are skipped by default via surefire config)15mvn clean package1617# Build with tests18mvn clean package -DskipTests=false1920# Run the standalone application (port 8080, context-path: /jeecg-boot)21cd jeecg-module-system/jeecg-system-start22mvn spring-boot:run2324# Build a specific module (with dependencies)25mvn clean package -pl jeecg-boot-base-core -am2627# Run a single test class28mvn test -DskipTests=false -pl <module> -Dtest=<TestClassName>2930# Build with microservices modules included31mvn clean package -P SpringCloud3233# Docker startup34./start-docker-compose.sh # or start-docker-compose.bat on Windows35```3637## Module Architecture3839```40jeecg-boot-parent (root pom)41├── jeecg-boot-base-core # Core framework: Shiro/JWT auth, MyBatis-Plus config,42│ # common utilities, AOP aspects, base controllers43├── jeecg-module-system # System management (users, roles, permissions, dicts, menus)44│ ├── jeecg-system-api # API interfaces (local-api vs cloud-api for mono/micro switch)45│ │ ├── jeecg-system-local-api # Direct method calls (monolithic)46│ │ └── jeecg-system-cloud-api # Feign clients (microservices)47│ ├── jeecg-system-biz # Business logic, entities, mappers, services48│ └── jeecg-system-start # Main entry point (JeecgSystemApplication), all configs49├── jeecg-boot-module # Business feature modules50│ ├── jeecg-module-demo # Demo/example code51│ ├── jeecg-boot-module-airag # AI/RAG integration52│ ├── jeecg-boot-module-easyoa # Simple OA module53│ ├── jeecg-boot-module-joa-flowable # OA + Flowable workflow54│ ├── jeecg-boot-module-pay # Payment module55│ └── jeecg-boot-module-wps # WPS document integration56└── jeecg-boot-platform # Low-code platform modules57 ├── jeecg-boot-module-bpm-flowable # BPM workflow engine58 ├── jeecg-boot-module-airag-flow # AI RAG flow59 ├── jeecg-boot-module-bigscreen # Big screen/dashboard designer60 ├── jeecg-boot-module-desform # Form designer61 ├── jeecg-boot-module-drag # Drag-and-drop report designer62 ├── jeecg-boot-module-lowapp # Low-code application engine63 ├── jeecg-boot-module-mindesflow-flowable # Simple flow designer64 └── jeecg-boot-module-online # Online code generator & forms65```6667Optional microservices modules (activated via `-P SpringCloud`):68- `jeecg-server-cloud/` — Gateway (port 9999), Nacos (8848/18080), cloud service starters, monitoring (9111), XXL-Job (9080), Sentinel (9000)6970## Key Technology Stack7172| Layer | Technology |73|-------|-----------|74| ORM | MyBatis-Plus 3.5.16 (`BaseMapper<T>`, `ServiceImpl<M,T>`) |75| Auth | Apache Shiro 3.0.0 + JWT 4.5.0, Redis-backed sessions |76| DB Pool | Druid 1.2.28 with dynamic datasource support |77| DB Migration | Flyway (scripts in `jeecg-system-start/src/main/resources/flyway/sql/mysql/`) |78| JSON | FastJSON 2 |79| Excel | AutoPoi (`autopoi-spring-boot-3-starter`) |80| API Docs | Knife4j 4.5.0 (OpenAPI v3, `@Schema` annotations) |81| Scheduled Jobs | Quartz (JDBC store, clustered) |82| File Storage | MinIO / Aliyun OSS / Qiniu (controlled by `jeecg.uploadType` config) |83| Microservices | Spring Cloud 2025.1.0.0 + Alibaba (Nacos, Gateway, Sentinel) |8485## Code Conventions & Patterns8687**Package structure:** `org.jeecg.modules.<module-name>.{controller,entity,mapper,mapper.xml,service,service.impl,vo}`8889**Naming conventions:**90- Entities: `Sys` prefix for system entities (e.g., `SysUser`, `SysRole`). Use `@TableName`, `@TableId(type = IdType.ASSIGN_ID)`91- Controllers: `<Entity>Controller extends JeecgController<Entity, IService>` — base class provides standard CRUD + Excel import/export92- Services: Interface `I<Entity>Service extends IService<Entity>`, impl `<Entity>ServiceImpl extends ServiceImpl<Mapper, Entity>`93- Mappers: `<Entity>Mapper extends BaseMapper<Entity>`, with XML in `mapper/xml/`9495**Common annotations on entities:** `@Data`, `@EqualsAndHashCode(callSuper = false)`, `@Accessors(chain = true)`, `@TableName`9697**API response wrapper:** `Result<T>` (from `org.jeecg.common.api.vo.Result`) — use `Result.OK(data)`, `Result.OK(msg, data)`, `Result.error(msg)`. The `result` field holds data, `success`/`code`/`message` hold status.9899**Auto query building:** `QueryGenerator.initQueryWrapper(entity, request.getParameterMap())` auto-builds `QueryWrapper` from HTTP request params, supporting fuzzy match, range queries, etc.100101**Monolithic ↔ Microservices switch:** The `jeecg-system-api` module has two implementations (`local-api` for direct calls, `cloud-api` for Feign). Switching is done by changing the dependency in the startup module, not by modifying business code.102103**代码修改痕迹日志:** 所有新增或修改的代码块必须用 `update-begin` / `update-end` 注释包裹,格式如下:104105```java106//update-begin---author:作者 ---date:YYYY-MM-DD for:【bug号/需求号】修改说明-----------107// 新增或修改的代码108//update-end---author:作者 ---date:YYYY-MM-DD for:【bug号/需求号】修改说明-----------109```110111规则:112- `author` 填实际修改人,`date` 填修改日期(格式 `YYYY-MM-DD`),`for` 填 bug 号或需求号 + 简要说明113- 新增方法:`update-begin` 放在方法声明前,`update-end` 放在方法结束 `}` 后114- 修改已有方法中的代码:`update-begin` / `update-end` 只包裹被修改的代码段,不包裹整个方法115- 用户未提供 bug 号时,需要主动询问116117## Database118119**Supported:** MySQL 8.0+ (default), PostgreSQL, Oracle 11g+, SQL Server 2017+, MariaDB, DM8 (达梦), KingBase ES. Database-specific configs are in `application-{dbtype}.yml` profiles.120121**Initial setup:** Import `db/jeecgboot-mysql-5.7.sql` for the base schema. Flyway handles incremental migrations (scripts organized by date folders like `202512/`).122123**Flyway note:** In dev mode, `spring.main.lazy-initialization=true` is enabled for startup speed, which can interfere with Flyway auto-config. Flyway auto-config is explicitly excluded and managed separately.124125## Configuration126127Main config files are in `jeecg-module-system/jeecg-system-start/src/main/resources/`:128- `application.yml` — profile selector (active profile set by Maven: dev/test/prod/docker)129- `application-dev.yml` — development config (port 8080, lazy-init enabled)130- Dev environment requires: MySQL, Redis. Optional: MongoDB, RabbitMQ131132Key config namespace: `jeecg.*` in YAML controls platform features (upload type, firewall settings, AI config, MinIO, shiro excludes, etc.).133134## Docker Services (docker-compose.yml)135136MySQL (port 13306), Redis, PostgreSQL+pgvector, MongoDB, and the application container (port 8080).137138## Online 低代码模块 (jeecg-boot-module-online)139140Online 模块采用**元数据驱动**架构,通过数据库配置表(`onl_cgform_*`)实现运行时 CRUD,无需生成代码。配置存在数据库中而非文件系统,Claude Code 无法直接读取具体表单配置,需用户提供 JSON 导出或截图。141142**完整的配置 Schema、控件类型、默认值语法、增强机制等详见: [online-form-schema.md](online-form-schema.md)**143
Also in jeecgboot/JeecgBoot
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| jeecgboot/JeecgBootjeecgboot-vue3/CLAUDE.md · 47k | CLAUDE.md | setupbuildtestlint-format+10 | 97/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| carrot-foundation/middle-earthCLAUDE.md · 0 | CLAUDE.md | setupbuildtestlint-format+6 | 97/100 | 3 days ago |
