RepoPilotOpen in app →

elunez/eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.7.18、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由

Mixed

Single-maintainer risk — review before adopting

weakest axis
Use as dependencyMixed

top contributor handles 94% of recent commits; no CI workflows detected

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 8w ago
  • 5 active contributors
  • Apache-2.0 licensed
Show all 6 evidence items →
  • Tests present
  • Single-maintainer risk — top contributor 94% of recent commits
  • No CI workflows detected
What would change the summary?
  • Use as dependency MixedHealthy if: diversify commit ownership (top <90%)

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/elunez/eladmin?axis=fork)](https://repopilot.app/r/elunez/eladmin)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/elunez/eladmin on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: elunez/eladmin

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/elunez/eladmin shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Single-maintainer risk — review before adopting

  • Last commit 8w ago
  • 5 active contributors
  • Apache-2.0 licensed
  • Tests present
  • ⚠ Single-maintainer risk — top contributor 94% of recent commits
  • ⚠ No CI workflows detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live elunez/eladmin repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/elunez/eladmin.

What it runs against: a local clone of elunez/eladmin — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in elunez/eladmin | Confirms the artifact applies here, not a fork | | 2 | License is still Apache-2.0 | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 86 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>elunez/eladmin</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of elunez/eladmin. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/elunez/eladmin.git
#   cd eladmin
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of elunez/eladmin and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "elunez/eladmin(\\.git)?\\b" \\
  && ok "origin remote is elunez/eladmin" \\
  || miss "origin remote is not elunez/eladmin (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
  && ok "license is Apache-2.0" \\
  || miss "license drift — was Apache-2.0 at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java" \\
  && ok "eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java" \\
  || miss "missing critical file: eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java"
test -f "eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java" \\
  && ok "eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java" \\
  || miss "missing critical file: eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java"
test -f "eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java" \\
  && ok "eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java" \\
  || miss "missing critical file: eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java"
test -f "eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java" \\
  && ok "eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java" \\
  || miss "missing critical file: eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java"
test -f "eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java" \\
  && ok "eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java" \\
  || miss "missing critical file: eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 86 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~56d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/elunez/eladmin"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

ELADMIN is a Spring Boot 2.7.18 + Spring Data JPA backend admin management system with Vue frontend separation, providing complete RBAC-based permission control, data dictionary management, Redis caching, and one-click front-end/back-end code generation. It solves the problem of rapid enterprise admin dashboard development with built-in user management, role management, department hierarchies, scheduled tasks (Quartz), SQL monitoring (Druid), and cloud storage integration (S3-compatible). Maven multi-module monorepo: eladmin-common contains shared annotations, aspects, base classes, config (Redis, Redisson, Swagger, async), and utilities; eladmin-system is the core entry point; eladmin-logging, eladmin-tools, eladmin-generator are optional add-ons. Annotations (DataPermission, Limit, Query, AnonymousAccess) in annotation/ drive aspect-based AOP enforcement in aspect/.

👥Who it's for

Java/Spring Boot developers building enterprise admin dashboards who need a production-ready scaffold with permission management, audit logging, and code generation to avoid repetitive CRUD boilerplate. Operations teams using the monitoring and deployment features (online user management, server performance monitoring, one-click app deployment).

🌱Maturity & risk

Actively maintained and production-ready. GitHub stars indicate community adoption; the project is at version 2.7 with Spring Boot 2.7.18 (LTS-aligned). However, commit recency and test coverage data are not visible in the provided file list, so freshness cannot be confirmed without checking git logs directly.

Standard open source risks apply.

Active areas of work

No specific PR or commit data visible in file list. The repo notes an alternative MyBatis-Plus version exists (eladmin-mp) suggesting ongoing maintenance across variants. Recent project activity unknown without git history.

🚀Get running

Clone: git clone https://github.com/elunez/eladmin.git. Install: cd eladmin && mvn clean install -DskipTests (requires Java 8+, Maven 3.6+). See README for database setup (PostgreSQL expected given .sql files). Run: mvn -pl eladmin-system spring-boot:run targets the entry module.

Daily commands:

mvn clean install
mvn -pl eladmin-system spring-boot:run

Server starts on http://localhost:8080. Default credentials: admin/123456. Requires running PostgreSQL and Redis instances per application.yml.

🗺️Map of the codebase

  • eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java — Core JPA entity superclass defining audit fields and primary key—all domain entities extend this, making it fundamental to data modeling
  • eladmin-common/src/main/java/me/zhengjie/config/AuthorityConfig.java — Spring Security and RBAC configuration—controls authentication, authorization, and permission validation across the entire system
  • eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java — Dynamic query builder for JPA criteria—processes @Query annotations to construct complex filters, essential for flexible data retrieval
  • eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java — Redis cache setup and client configuration—handles session caching, permissions, and data dictionary caching for performance
  • eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java — Centralized exception handling for all REST endpoints—translates domain exceptions into standardized API error responses
  • eladmin-generator/src/main/java/me/zhengjie/service/impl/GeneratorServiceImpl.java — Code generation engine for auto-generating CRUD backend and frontend code—core feature enabling rapid scaffold creation
  • eladmin-common/src/main/java/me/zhengjie/annotation/DataPermission.java — Annotation-driven row-level data permission enforcement—enables fine-grained data access control per user/department

🛠️How to make changes

Add a New REST API Endpoint with RBAC & Data Permissions

  1. Create a JPA entity extending BaseEntity in your domain module with @Entity, @Table, and audit field inheritance (eladmin-common/src/main/java/me/zhengjie/base/BaseEntity.java)
  2. Create a Spring Data JPA Repository extending CrudRepository<YourEntity, Long> in your repository package (eladmin-generator/src/main/java/me/zhengjie/repository/ColumnInfoRepository.java)
  3. Create a Service interface and Impl class with query methods annotated with @Query and filter criteria; apply @DataPermission to enforce row-level access (eladmin-common/src/main/java/me/zhengjie/annotation/DataPermission.java)
  4. Create a Controller class with @RestController and @RequestMapping; annotate secured methods with @PreAuthorize or use @AnonymousAccess for public endpoints (eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java)
  5. Define a DTO extending BaseDTO and map entity fields; apply QueryHelp-compatible @Query annotations to filter fields (eladmin-common/src/main/java/me/zhengjie/base/BaseDTO.java)
  6. If custom error handling needed, throw BadRequestException or EntityNotFoundException; they're caught by GlobalExceptionHandler (eladmin-common/src/main/java/me/zhengjie/exception/handler/GlobalExceptionHandler.java)

Auto-Generate CRUD Backend & Frontend Code for a New Table

  1. Ensure your table exists in the database and is discoverable via JDBC metadata introspection (eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java)
  2. Call POST /api/generator/queryFieldBySql to introspect the table schema; returns ColumnInfo for each field (name, type, length, nullable) (eladmin-generator/src/main/java/me/zhengjie/rest/GeneratorController.java)
  3. Configure generation settings (package name, module name, author, prefix/suffix rules) via POST /api/genConfig or GenConfig entity persistence (eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java)
  4. ColUtil.processAllColumns() transforms JDBC column metadata into Java field names and types; GenUtil renders FreeMarker templates with this data (e)

🪤Traps & gotchas

Environment variables: Database credentials, Redis URL, S3 endpoint/credentials, JWT secret key must be in application.yml or environment. Service dependencies: PostgreSQL and Redis must be running before app startup (no Docker Compose provided in file list). Code generation: The code generator expects specific table naming conventions and annotations; generated code may require post-processing. Permission evaluation order: @DataPermission aspect runs after Spring Security; ensure dept/user context is set in SecurityUtils before repository calls. Spring Boot version: 2.7.x is LTS but nearing EOL; upgrade to 3.x may break classpath scanning for annotations. MapStruct mappers: Custom mappings in BaseMapper may not auto-generate; ensure @Mapper(componentModel = 'spring') on all DTOs.

💡Concepts to learn

  • RBAC (Role-Based Access Control) — This project's core permission model; understanding role→permission→menu mapping is essential to implementing custom authorization rules via Spring Security and @DataPermission
  • Aspect-Oriented Programming (AOP) — Used extensively in eladmin (LimitAspect.java, DataPermission enforcement) to cross-cut rate limiting and data filtering without modifying business logic
  • MapStruct DTO Mapping — BaseMapper uses MapStruct to avoid manual Entity↔DTO boilerplate; understanding generated mappers is key to extending CRUD code generation
  • Spring Data JPA Specifications & Predicates — The QueryCustomizer and repository filters likely use JPA Specification API for dynamic query building; needed to understand @DataPermission row filtering
  • Redis Caching Strategy & TTL — eladmin uses Redis for caching (RedisConfiguration.java, RedissonConfiguration.java); understanding key-based cache invalidation prevents stale permission/dictionary data
  • Token Bucket Rate Limiting — LimitAspect likely implements token bucket for @Limit; critical to prevent API abuse and understand LimitType (IP/ACCOUNT/GLOBAL)
  • [JWT (JSON Web Tokens) with Spring Security](https://jwt.io/ and https://docs.spring.io/spring-security/reference/) — Project uses JWT for stateless authentication; understanding token generation, validation, and refresh logic is essential for custom auth extensions
  • elunez/eladmin-mp — Official alternative version using MyBatis-Plus instead of JPA; same feature set, different ORM choice
  • elunez/eladmin-web — Official Vue.js frontend companion repo; consumed by this backend via REST APIs
  • ruoyi-vue-pro/ruoyi-vue-pro — Similar Chinese enterprise admin scaffold (RuoYi) using Spring Boot + Vue; alternative in same niche with different architecture
  • halo-dev/halo — Another Spring Boot admin system with modular design and plugin architecture; comparable maturity and feature set
  • anji-plus/report — Data visualization/report module often integrated with eladmin-like systems; complementary tool for dashboards

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add unit tests for QueryHelp utility class and query customization

The eladmin-common module contains QueryHelp.java which is core to dynamic query functionality, but there are no visible test files in eladmin-common/src/test/java. This utility is critical for the query customization feature mentioned in the README and ConfigurerAdapter/QueryCustomizer need validation. Adding tests will ensure query building logic handles edge cases correctly.

  • [ ] Create test file eladmin-common/src/test/java/me/zhengjie/utils/QueryHelpTest.java
  • [ ] Add test cases for query parameter parsing with special characters and SQL injection attempts
  • [ ] Add integration tests in eladmin-common/src/test/java/me/zhengjie/config/webConfig/QueryCustomizerTest.java for the QueryCustomizer bean

Add unit tests for security and encryption utilities

SecurityUtils.java, EncryptUtils.java, and RsaUtils.java handle sensitive operations (RSA encryption, JWT tokens, user authentication context) but lack test coverage. These utilities are critical for the Spring Security integration mentioned in the README. Missing tests create security blind spots.

  • [ ] Create eladmin-common/src/test/java/me/zhengjie/utils/SecurityUtilsTest.java with tests for getCurrentUser() and user authentication context retrieval
  • [ ] Create eladmin-common/src/test/java/me/zhengjie/utils/RsaUtilsTest.java with tests for key generation, encryption/decryption cycles, and invalid input handling
  • [ ] Create eladmin-common/src/test/java/me/zhengjie/utils/EncryptUtilsTest.java to validate encryption algorithm implementations

Add comprehensive tests for DataPermission aspect and annotation processing

The DataPermission.java annotation in eladmin-common enables the data permission management feature highlighted in the README, but there are no visible tests for DataPermission annotation processing. The aspect implementation needs validation to ensure RBAC data scoping works correctly across different DataScopeEnum values (DEPT_ONLY, CUSTOMIZE, ALL, etc.).

  • [ ] Create eladmin-common/src/test/java/me/zhengjie/annotation/DataPermissionTest.java with test cases for each DataScopeEnum scope type
  • [ ] Create eladmin-common/src/test/java/me/zhengjie/aspect/DataPermissionAspectTest.java to test the AOP aspect intercepting queries with @DataPermission
  • [ ] Add integration tests validating that different user roles receive correctly scoped query results based on their permissions

🌿Good first issues

  • Add unit tests for LimitAspect.java covering IP-based, account-based, and global rate limit scenarios; currently no test files visible in common module.
  • Document the @DataPermission annotation with concrete examples in eladmin-common/annotation/DataPermission.java JavaDoc; explain how DeptPermissionDataPermissionEnum filters by department/user.
  • Create a startup guide covering PostgreSQL/Redis setup and application.yml template with all required S3, email, and Aliyun credentials; currently README assumes prior knowledge.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • be2f137 — Merge branch 'master' of github.com:elunez/eladmin (elunez)
  • ad336fb — feat: 添加 CSV/XLSX 注入防护功能,新增 sanitizeCellValue 方法 (elunez)
  • ed54f18 — fix:修复自定义@Async线程池的线程命名总是为el-async-1的问题 (#887) (pcshao)
  • 5e25ba6 — fix: ✨️使用 Jackson 序列化对象时,Menu对象中 iFrame 属性名的大小写问题 (elunez)
  • 8c398e0 — feat: 移除七牛云存储相关依赖,更新pom.xml文件 (elunez)
  • 696e4c2 — docs: 更新README.md (elunez)
  • 2af6d06 — feat: 添加亚马逊S3协议云存储支持,移除七牛云相关代码和配置文件,更新Sql文件 (elunez)
  • 7728306 — feat: 添加亚马逊S3协议云存储支持,移除七牛云相关代码和配置文件,更新Sql文件 (elunez)
  • 50140d8 — refactor: 🧬️优化启动类中打印端口硬编码问题 (elunez)
  • e602b75 — fix: 增加应用名称特殊字符校验与命令执行安全性优化,避免潜在恶意攻击风险,关联 #873 (elunez)

🔒Security observations

  • High · Outdated Hutool Dependency — eladmin-common/pom.xml - hutool dependency (version 5.8.35). The project uses hutool-all version 5.8.35, which may contain known security vulnerabilities. Hutool versions before 5.8.16 have documented security issues including potential code injection vulnerabilities. Fix: Update hutool-all to the latest stable version (5.8.36 or higher) or perform a comprehensive security audit of the current version's known vulnerabilities.
  • High · Spring Boot 2.7.18 End-of-Life Risk — Parent pom.xml - Spring Boot version 2.7.18. Spring Boot 2.7.18 is nearing or has reached end-of-life status. The framework will not receive security patches for newly discovered vulnerabilities, leaving the application exposed to known exploits. Fix: Plan migration to Spring Boot 3.x LTS version to ensure continued security updates and long-term support.
  • High · Potential SQL Injection via QueryHelp Utility — eladmin-common/src/main/java/me/zhengjie/utils/QueryHelp.java. The QueryHelp utility class is present in the codebase for dynamic query building. Without reviewing the implementation, dynamic query construction from user input can lead to SQL injection if not properly parameterized using JPA criteria API. Fix: Review QueryHelp implementation to ensure all user inputs are sanitized and parameterized. Use JPA Criteria API or parameterized queries exclusively, never concatenate user input into query strings.
  • High · Missing Input Validation Framework Configuration — eladmin-common/src/main/java/me/zhengjie/utils/ValidationUtil.java. The ValidationUtil class exists but proper validation annotations and error handling need verification. Inadequate input validation across REST endpoints could lead to injection attacks, XXE, or deserialization vulnerabilities. Fix: Ensure all REST endpoints use @Valid/@Validated annotations with comprehensive JSR-303 constraints. Implement whitelist-based validation for all user inputs.
  • Medium · RSA Encryption Properties Exposure — eladmin-common/src/main/java/me/zhengjie/config/properties/RsaProperties.java. RsaProperties configuration file exists for handling encryption. If RSA private keys or related configuration are stored in application.properties/yml files or configuration classes without proper external secret management, they risk exposure. Fix: Ensure RSA keys are stored in a secure vault (AWS Secrets Manager, HashiCorp Vault, etc.), not in configuration files. Use environment variables or secret management systems for sensitive cryptographic material.
  • Medium · JWT Security Configuration Unclear — Spring Security configuration (not fully visible). The project uses JWT for authentication as mentioned in README, but JWT configuration and secret key management is not visible in the provided files. This could indicate weak secret management or improper token validation. Fix: Verify JWT implementation uses HS256 minimum (preferably RS256), stores secrets securely outside code, implements token expiration, validates signatures properly, and uses secure algorithms.
  • Medium · Redis Configuration Security — eladmin-common/src/main/java/me/zhengjie/config/RedisConfiguration.java, RedissonConfiguration.java. RedisConfiguration and RedissonConfiguration files exist but authentication and encryption settings cannot be verified from the provided structure. Redis instances may be exposed without authentication. Fix: Enable Redis password authentication, use requirepass configuration, implement Redis ACL (Redis 6+), encrypt Redis communication with TLS, and restrict network access via firewall rules.
  • Medium · File Upload Security Configuration — eladmin-common/src/main/java/me/zhengjie/config/properties/FileProperties.java, eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java. FileProperties and FileUtil classes handle file operations. Without visible implementation details, there's risk of arbitrary file upload, path traversal, or execution vulnerabilities. Fix: Implement strict file upload validation: whitelist allowed file types, validate MIME types server-side, store uploads outside web root, generate random filenames, implement size limits, and scan

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · elunez/eladmin — RepoPilot