当前位置:网站首页>若依框架代码生成详解
若依框架代码生成详解
2022-07-27 01:45:00 【渔夫阿布】
文章目录
1.若依项目的部署以及本地运行
详细过程请看本篇文章
https://blog.csdn.net/yu_fu_a_bu/article/details/125901873
2.新增一个学校管理目录

刷新一下
3.修改配置

4.建立数据表
若依建表有个要求:表字段 和 表,都需要加注释,注释就是生成页面的显示内容

5.新建一个Model

6.配置项目依赖
①:在 RuoYi 整个项目下的pom.xml中引入刚刚新建的模块

<!--老师模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-teacher</artifactId>
<version>${ruoyi.version}</version>
</dependency>
②:在ruoyi-admin这个模块的pom.xml中引入刚刚新建的模块

<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-teacher</artifactId>
</dependency>
③:由于自动生成的代码会用到ruoyi-common中的内容,我们需要将ruoyi-common引入到我们新建的模块中
<dependencies>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
</dependencies>
7.导入表的结构

导入后点击 [编辑] ,[生成信息] :建议把生成模块名和生成业务名写的不一样,否则后面可能会遇到问题
点击生成代码
将文件进行加压缩
8.复制代码
直接将main复制到src下面

9.运行SQL
自动生成的压缩包里有个SQL,这是用来生成菜单的,去数据库里执行一下这个SQL。

10.重新启动项目

恭喜你完成了!
边栏推荐
- 渗透测试-后渗透-痕迹清理
- Code practice when the queue reaches the maximum length
- 注解@Autowired和@Resource的区别总结
- Fastboot刷机
- Docker creates MySQL 8.x container and supports Mac and arm architecture chips
- 将幕布文章OPML转换为Markdown的方法
- 队列达到最大长度代码实战
- Safe-arc/warner power supply maintenance xenon lamp power supply maintenance analysis
- Submodule cache cache failure
- Worthington过氧化物酶活性的6种测定方法
猜你喜欢

图解用户登录验证流程,写得太好了!

Plato farm has a new way of playing, and the arbitrage eplato has secured super high returns

Attention should be paid to the first parameter of setTimeout

【树链剖分】模板题

It's too strong. An annotation handles the data desensitization returned by the interface

Worthington木瓜蛋白酶解离系统解决方案

Abbkine AbFluor 488 细胞凋亡检测试剂盒特点及实验建议

延时队列的几种实现姿势?日常必备技能!

spark学习笔记(六)——sparkcore核心编程-RDD行动算子

An error in the fourth edition of the red book?
随机推荐
Functions that should be selected for URL encoding and decoding
【学习笔记之菜Dog学C】字符串+内存函数
Pytorch损失函数总结
字节一面:TCP 和 UDP 可以使用同一个端口吗?
How to design the red table of database to optimize the performance
将幕布文章OPML转换为Markdown的方法
Spark: calculate the average value of the same key in different partitions (entry level - simple implementation)
Call jshaman's Web API interface to realize JS code encryption.
vector 转 svg 方法
【树链剖分】模板题
MySQL的数据库有关操作
MySQL:互联网公司常用分库分表方案汇总
On the prototype of constructor
Boom 3D new 2022 audio enhancement app
185. All employees with the top three highest wages in the Department (mandatory)
pip3 设置阿里云
再学RecyclerView的回收复用机制
微信小程序生成Excel
Best practices of opentelemetry in service grid architecture
Submodule cache cache failure