Boost Your Java CRUD Development with EasyCode: A Step‑by‑Step Guide
This article introduces the EasyCode IntelliJ plugin, explains how it generates CRUD code for Java projects using custom Velocity templates, walks through installation and configuration steps with screenshots, and shows the necessary Spring Boot adjustments to get a fully functional backend up and running.
EasyCode
EasyCode is a code‑generation plugin for IntelliJ IDEA Ultimate that uses custom Velocity templates to create various code artifacts such as Entity, Dao, Service, and Controller classes. It can also generate HTML, JavaScript, PHP, and any data‑related code, making it especially useful for CRUD‑only projects.
The plugin can be installed directly from the IntelliJ Marketplace.
Sample Project
The demonstration uses a Spring Boot + MyBatis‑Plus + Vue & Element backend management system with features like RBAC, multi‑tenant, data permissions, workflow, third‑party login, payment, SMS, and e‑commerce.
Project repository: https://github.com/YunaiV/ruoyi-vue-pro
Video tutorial: https://doc.iocoder.cn/video/
Using EasyCode
1. Connect to the database you want to generate code for.
2. Right‑click the table(s) you wish to generate code for and select the generation option.
3. Configure the output package path in the settings.
4. Choose the desired generation options (e.g., include Service, Controller, etc.).
5. After generation, the CRUD code appears automatically.
6. Finally, add @MapperScan("com.example.easycode.dao") to the Spring Boot main class and ensure the DAO package is included.
package com.example.easycode;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("com.example.easycode.dao")
public class EasycodeApplication {
public static void main(String[] args) {
SpringApplication.run(EasycodeApplication.class, args);
}
}After these steps, the generated code is ready to run.
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.
Java Tech Enthusiast
Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!
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.
