下载若依前后端版本并在本地运行

下载若依前后端版本并在本地运行

参考视频:https://www.bilibili.com/video/BV1HT4y1d7oA/?spm_id_from=333.337.search-card.all.click&vd_source=0dcc3acedc4fc1c77ebc9bfbcbd12cec

若依

what?

开源项目,二次开发来完成自己的任务。

是一个数据和用户权限管理系统

三个版本:ruoyi:springboot、ruoyi-vue前后端分离、cloud微服务(换后台为springcloud)

官网:https://www.ruoyi.vip/

why?

功能完整,文档丰富,包括前后端、数据库,可以减少工作量。

学习优秀开源项目底层的编程思想,提高自己的编程能力。

how?

前期准备:

基础:SpringBoot+Vue(可以先学习 楠)

环境:

1、JDK cmd→java -version→1.8.0

2、MySQL:业务数据 Redis:缓存数据

3、Maven:基于此构建环境

4、Vue

如何使用开源项目?

下载并运行、看懂业务流程→二次开发

1、下载:

Q1:idea-如何从GitHub/GITEE下载项目?

复制下载链接→file(version control)→directory(本地存放根目录)

项目架构:

ruoyi-ui 前台 纯vue工程 单独打开

其余ruoyi-后台 后台跑admin,其余是工具类

2、运行

2.1 启动后台:

2.1.1 安装redis

https://github.com/tporadowski/redis/releases

https://github.com/lework/RedisDesktopManager-Windows/releases

端口号:6379

安装:https://www.bilibili.com/video/BV17D4y1M7ha/?spm_id_from=333.337.search-card.all.click&vd_source=0dcc3acedc4fc1c77ebc9bfbcbd12cec
在这里插入图片描述
在这里插入图片描述在这里插入图片描述

2.1.2 配置数据库MySQL

执行sql脚本

https://blog.csdn.net/Freer_von/article/details/126362573

Q2:执行sql脚本时出现报错
在这里插入图片描述

解决:https://stackoverflow.com/questions/4005409/error-1046-no-database-selected-how-to-resolve

指明数据库 在两个sql文件前加USE ruoyi;

结果:成功导入
在这里插入图片描述

修改application-druid.yml:
在这里插入图片描述
在这里插入图片描述

2.1.3 配置redis

修改application.yml的host:
在这里插入图片描述

2.1.4 运行

Q:运行报错

在这里插入图片描述

[org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘captchaController’: Unsatisfied dependency expressed through field ‘configService’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sysConfigServiceImpl’: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis_win:6379
](org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘captchaController’: Unsatisfied dependency expressed through field ‘configService’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sysConfigServiceImpl’: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to redis_win:6379
解决:redis配置有误 改redis_win为127.0.0.1即可

在这里插入图片描述

2.1.5 启动成功

在这里插入图片描述

2.2 启动前台

单独打开ruoyi-ui

运行npm install 和npm run dev

启动成功

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

  • 27
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值