EasyCode: Generate code with one click
Easycode is a plug-in of idea, which can directly generate entities, controllers, services, dao, and mappers for data tables without any coding. It is simple and powerful.
1. Installation (EasyCode)

I have already installed it here.
It is recommended that you install a plug-in called Lombok.
Lombok can automatically generate constructors, getters/setters, equals, hashcode, and toString methods for properties at compile time through annotations. The magic that happens is that there are no getter and setter methods in the source code, but there are getter and setter methods in the compiled bytecode file.
2. Create a database
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
3. Configure the connection database in IDEA
Before this, create a new Springboot project, which should be relatively simple.
After building the SpringBoot project, as shown in the figure below, find the Database
## Proceed as shown in the figure below: - ##Then fill in the database name, user name, password. Just click OK. In this case, IDEA is ready to connect to the database.
4. Start generating code
- Find the table you want to generate here, then right-click, and the section shown below will appear.
点击1所示的位置,选择你要将生成的代码放入哪个文件夹中,选择完以后点击OK即可。
勾选你需要生成的代码,点击OK。
这样的话就完成了代码的生成了,生成的代码如下图所示:
5、pom.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
6、Application.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
7、启动项目
在启动项目之前,我们需要先修改两个地方。
在dao层加上@mapper注解
在启动类里面加上@MapperScan("com.vue.demo.dao")注解。
启动项目
测试一下

The above is the detailed content of EasyCode: Generate code with one click. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Troubleshooting and solutions to the company's security software that causes some applications to not function properly. Many companies will deploy security software in order to ensure internal network security. ...

Solutions to convert names to numbers to implement sorting In many application scenarios, users may need to sort in groups, especially in one...

Field mapping processing in system docking often encounters a difficult problem when performing system docking: how to effectively map the interface fields of system A...

When using MyBatis-Plus or other ORM frameworks for database operations, it is often necessary to construct query conditions based on the attribute name of the entity class. If you manually every time...

Start Spring using IntelliJIDEAUltimate version...

Conversion of Java Objects and Arrays: In-depth discussion of the risks and correct methods of cast type conversion Many Java beginners will encounter the conversion of an object into an array...

Detailed explanation of the design of SKU and SPU tables on e-commerce platforms This article will discuss the database design issues of SKU and SPU in e-commerce platforms, especially how to deal with user-defined sales...

How does the Redis caching solution realize the requirements of product ranking list? During the development process, we often need to deal with the requirements of rankings, such as displaying a...
