介绍
RuoYi基于SpringBoot、Shiro、Mybatis的权限后台管理系统
RuoYi是一个后台管理系统,基于经典技术组合(Spring Boot、Apache Shiro、MyBatis、Thymeleaf)主要目的让开发者注重专注业务,降低技术难度,从而节省人力成本,缩短项目周期,提高软件安全质量。
文档地址:介绍 | RuoYi
下载地址:RuoYi: 🎉 基于SpringBoot的权限管理系统 易读易懂、界面简洁美观。 核心技术采用Spring、MyBatis、Shiro没有任何其它重度依赖。直接运行即可用
系统需求
- JDK >= 1.8
- MySQL >= 5.7
- Maven >= 3.0
如果你初次使用可以看下面文章
1.JDK 1.8下载、安装、配置、检查是否安装成功-CSDN博客
3.eclipse下载与安装,汉化教程超详细
https://cplvfx.blog.csdn.net/article/details/140848113
下载
下载地址
RuoYi: 🎉 基于SpringBoot的权限管理系统 易读易懂、界面简洁美观。 核心技术采用Spring、MyBatis、Shiro没有任何其它重度依赖。直接运行即可用
下载完成后解压,目录内容如下
一、导入Eclipse
导入到Eclipse
,
菜单 File
-> Import
,
然后选择 Maven
-> Existing Maven Projects
,点击 Next
> 按钮,
选择工作目录,然后点击 Finish
按钮,即可成功导入。
Eclipse
会自动加载Maven
依赖包,初次加载会比较慢(根据自身网络情况而定)
二、导入数据库
创建数据库ry
并导入数据脚本ry_2021xxxx.sql
,quartz.sql
1.创建数据库ry
进入数据库管理器,点击新建
创建数据库 ry
ry 数据库创建成功
2.导入数据
找到你的项目,在你的项目下有个sql文件夹
2.1导入ry_20240601.sql
选中数据库ry,
点击导入,
点击选择文件,
找到sql文件,
选中后,点击执行
点击选择文件,
选中文件后, 提示,正在上传文件
导入成功提示
2.2导入 quartz.sql 步骤同上
步骤同上
导入成功后
多了一部分表
三、运行项目
3.1配置Maven
进入Window->Preferences->Maven->Installations页面,设置已经安装好的Maven
如果没有点击Add 添加
选择Maven安装目录,
勾选刚才添加的,点击完成
英文版
3.2配置Maven仓库路径
进入Window->Preferences->Maven->User Settings页面,配置仓库路径
英文版
3.3关闭校验
进入Window->Preferences->Validation页面,勾选“Suspend all validators”,关闭校验
英文版
3.4修改数据库连接
编辑src/main/ resources目录下的application-druid.yml 文件,修改数据库地址账号信息。
执行sql/ ry_20180423.sql,quartz.sql 两个文件 日期随版本变化
3.5开发环境配置
编辑src/main/ resources目录下的application.yml 文件,
默认端口为80
3.6 初始化包
右键项目》运行方式》Maven install
运行后如果出现【BUILD SUCCESS】
3.7编译打包
右键项目》运行方式》Maven build
我这里没有其他操作,直接点击【运行】
这里会有个报错
内容如下
[[1;34mINFO[m] Scanning for projects...
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;31mBUILD FAILURE[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time: 0.176 s
[[1;34mINFO[m] Finished at: 2024-08-01T17:45:56+08:00
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;31mERROR[m] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [1m[Help 1][m
[[1;31mERROR[m]
[[1;31mERROR[m] To see the full stack trace of the errors, re-run Maven with the [1m-e[m switch.
[[1;31mERROR[m] Re-run Maven using the [1m-X[m switch to enable full debug logging.
[[1;31mERROR[m]
[[1;31mERROR[m] For more information about the errors and possible solutions, please read the following articles:
[[1;31mERROR[m] [1m[Help 1][m http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
重点是这句话
No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. ->
译文
尚未为此版本指定目标。您必须以以下格式指定有效的生命周期阶段或目标:<plugin-prefix>:<goal>或<plugin group id>:<plugin artifact id>[:<plugin-version>]:<goal>。可用的生命周期阶段包括:预清理、清理、后清理、验证、初始化、生成源、过程源、生成资源、过程资源、编译、过程类、生成测试源、过程测试源、生成测试资源、过程测试资源、测试编译、过程测试类、测试、准备包、包、预集成测试、集成测试、后集成测试、验证、安装、部署、预站点、站点、后站点、站点部署。->
解决方案是
找到项目下的【pom.xml】文件,打开后,找到【build】节点,
在下面加上下面代码
<defaultGoal>compile</defaultGoal>
加上代码后,保存,重新右键项目》运行方式》Maven build
只要你看到【BUILD SUCCESS】就意味着成功了。
3.8运行
启动RuoYiApplication.java 出现如下图表示启动成功
项目ruoyi-admin》src/main/java》com.ruoyi》RuoYiApplication.java》打开
在文件空白位置右键》运行方式》java应用程序
此时,控制台会有“若依启动成功 ”提示(下图的1标示处)
且,控制台窗体右上角会的【灰色小格子】编程【红色小格子】(下图的2标示处)
3.9 打开浏览器
因为我在配置文件里配置的端口号是8031,所以我输入:
swagger地址是:http://localhost:8031/swagger-ui/index.html
到这里,恭喜你!你的java-若依/RuoYi项目从【下载】至【导入】至【安装】至【运行】
完成完成!!!
3.10运行方式2
右键项目》运行方式》java应用程序
找到【RuoYiApplication.java】点击他,或者点击确定,依然是可以运行的