首先需要在码云上下载RuoYi-vue解压到你的工作目录(https://gitee.com/y_project/RuoYi-Vue)
然后去nodejs官网下载nodejs
除了选择你的安装目录一直next(查看环境变量是否配置成功)
安装完成后,cmd中输入:node -v npm –v
第一种运行前端的方法:
管理员身份打开cmd
切换到项目路径下:cd /你的项目根目录
输入命令
npm install
(推荐使用npm install --registry=https://registry.npm.taobao.org这个速度更快)
npm run dev
(这里我npm install 完了)
第二种运行前端的方法
将项目导入idea之后找到open打开前端ruoyi-ui
首先要在IDEA里安装vue插件,File->Setttings->plugins 在搜索框输入vue
在Terminal窗口执行命令npm install
(或npm install --registry=https://registry.npm.taobao.org)
在输入npm run dev
后端
点击Import Project
找到application-druid.yml改为你的数据库(建数据库运行sql)
然后去redis官网(https://redis.io/)下载,要不然出不来验证码
下载完之后点击redis-server.exe
tips:
如果你的项目启动成功验证码正确进不去报如下错误
Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError:
需要到以下依赖
<dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-core</artifactId><version>2.3.0</version></dependency><dependency><groupId>javax.activation</groupId><artifactId>activation</artifactId><version>1.1.1</version></dependency>