若依代码生成使用教程

若依代码生成

1.先在若依数据库里建好库并且给库名备注一下,方便在若依上看,怎么备注看我这个博客
https://blog.csdn.net/Andrew0219/article/details/118728251
2.打开若依-系统工具-代码生成-导入
3.编辑-修改里面的信息
4.生成代码-打开生成压缩包,把里面的sql文件在数据库再运行一次
5.导入main
6.先给导入的项目xml添加依赖

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>ruoyi-common</artifactId>
        </dependency>

    </dependencies>

7.如果你是跟我一样,即创建的ruoyi-book和ruoyi-admin并列
在这里插入图片描述
那么在admin的pom.xml里添加上依赖

        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>ruoyi-book</artifactId>
        </dependency>

8.在总的pom.xml添加依赖

            <dependency>
                <groupId>com.ruoyi</groupId>
                <artifactId>ruoyi-book</artifactId>
                <version>${ruoyi.version}</version>
            </dependency>

   <modules>
  // 这里也加上book
        <module>ruoyi-admin</module>
        <module>ruoyi-book</module>
    </modules>

9.Build Project部署一下,不然会404
在这里插入图片描述
10 运行这时候应该是成功了

实例演示中的弹框

在html页面下link需要的css文件

<link th:href="@{css/bootstrap.min.css}">
<link th:href="@{css/main/animate.min.css}">

去bootstrap4寻找对应的代码,因为若依使用的就是bootstrap


<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
    Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content animated flipInY">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                ...
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

即可生成效果

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Andrew0219

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值