Build a Zero‑Code Backend Admin System in Minutes with Erupt
This article introduces the Erupt framework—a pure‑Java, annotation‑driven backend admin solution that requires no front‑end code, generates CRUD interfaces automatically, and can spin up a complete management system in just a few minutes, with step‑by‑step setup, configuration, and customization examples.
Erupt is a generic backend management framework that boasts ultra‑low code, zero front‑end code, zero CRUD operations, no table creation, and pure Java annotation development, claiming you can build a full admin system in three minutes.
Environment Setup
Erupt supports Java 1.8+ and Spring Boot 2.0+. Add the required JARs to pom.xml:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- User permission management -->
<dependency>
<groupId>xyz.erupt</groupId>
<artifactId>erupt-upms</artifactId>
<version>1.6.7</version>
</dependency>
<!-- Data security -->
<dependency>
<groupId>xyz.erupt</groupId>
<artifactId>erupt-security</artifactId>
<version>1.6.7</version>
</dependency>
<!-- Web UI -->
<dependency>
<groupId>xyz.erupt</groupId>
<artifactId>erupt-web</artifactId>
<version>1.6.7</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>Configure the datasource in application.yml (a simple MySQL URL, username, and password are enough). The framework will create the necessary tables on first launch.
First Run
Start the application; Erupt uses JPA to generate system tables automatically. The default admin account is username erupt and password erupt. Access http://127.0.0.1:8888/ to see the login page.
Defining a Custom Page
Use Java annotations to describe a page. The two core annotations are @Erupt (marks a class as a page) and @EruptField (marks a field to be displayed). Additional annotations such as @Power, @Search, and @Table control operations, search conditions, and table mapping.
/* @Erupt annotation on class, @EruptField on fields */
@Getter
@Setter
@Erupt(name = "学生表", power = @Power(importable = true, export = true))
@Entity
public class Student extends BaseModel {
@EruptField(
views = @View(title = "学生姓名"),
edit = @Edit(title = "学生姓名", notNull = true, search = @Search(vague = true))
)
private String studentName;
// other fields omitted for brevity
}After defining the entity, create a menu entry in the Erupt admin UI. Set the menu type value to the class name (e.g., Student) so the page appears.
Data Validation with DataProxy
Implement a DataProxy to add custom logic before or after CRUD operations. For example, block the name "张三" during addition:
@Erupt(name = "学生表", dataProxy = {StudentDataProxy.class}, power = @Power(importable = true, export = true))
@Entity
public class Student extends BaseModel { }
public class StudentDataProxy implements DataProxy<Student> {
@Override
public void beforeAdd(Student student) {
if ("张三".equals(student.getStudentName())) {
throw new EruptApiErrorTip("名称禁止为张三!");
}
}
// other callbacks omitted
}Additional Features
Erupt also provides ready‑made APIs for task scheduling, multi‑table joins, front‑back separation deployment, API permissions, operation logs, multiple data sources, mail system, black‑/white‑list control, and more.
Pros and Cons
Pros: rapid development, low learning curve, suitable for beginners, and extensive built‑in functionalities.
Cons: deep encapsulation may limit highly customized business logic, and the community is relatively small.
Project Links
GitHub repository: https://github.com/erupts/erupt
The framework is also used in the mall e‑commerce project (60K stars) with full video tutorials available.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
