找回密码
 立即注册
首页 业界区 业界 ruoyi-vue初步接触

ruoyi-vue初步接触

璋锌 2025-9-16 13:53:08
因为最近参加了一个比赛,培训的时候说最终考试是要求使用ruoyi-vue来做功能,于是我在网上找到了ruoyi这个项目,准备给他搭建起来。
找了一下官网 发现了这个 准备工作
 然后我就开始查看本机环境
  1. java --version
  2. openjdk 21.0.8 2025-07-15
  3. OpenJDK Runtime Environment (build 21.0.8+9-Ubuntu-0ubuntu122.04.1)
  4. OpenJDK 64-Bit Server VM (build 21.0.8+9-Ubuntu-0ubuntu122.04.1, mixed mode, sharing)
复制代码
  1. mysql --version
  2. mysql  Ver 8.0.43-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
复制代码
还有个 Maven ,我发现这个我没有,就赶紧去装一个 还是apt命令老一套
  1. sudo apt install maven
复制代码
然后看看版本
  1. mvn --version
  2. Apache Maven 3.6.3
  3. Maven home: /usr/share/maven
复制代码
好了,然后去克隆仓库
就 git clone 呗
  1. git clone https://gitee.com/y_project/RuoYi.git
复制代码
然后,就是来到仓库下面,给那个 ruoyi-admin/src/main/resources/application-druid.yml 文件里面的连接数据库的信息改改,就是这段
  1.             master:
  2.                 url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  3.                 username: root
  4.                 password: root
复制代码
配置完了,就把数据库也对应的导入一下。
  1. mysql> create database `ry-vue` charset utf8mb4;
  2. Query OK, 1 row affected (0.03 sec)
  3. mysql> use `ry-vue`
  4. Database changed
复制代码
然后导进去数据库文件 mysql> source /home/zhaoyao/script/java/RuoYi-Vue/sql/ry_20250522.sql; 
好了,然后数据库创建好了。
来到仓库目录下,ll 命令看一下列表
  1. ll
  2. total 76K
  3. drwxrwxr-x 2 zhaoyao zhaoyao 4.0K  9月  8 17:57 bin
  4. drwxrwxr-x 2 zhaoyao zhaoyao 4.0K  9月  8 17:57 doc
  5. -rw-rw-r-- 1 zhaoyao zhaoyao 1.1K  9月  8 17:57 LICENSE
  6. -rw-rw-r-- 1 zhaoyao zhaoyao  10K  9月  8 17:57 pom.xml
  7. -rw-rw-r-- 1 zhaoyao zhaoyao 9.7K  9月  8 17:57 README.md
  8. drwxrwxr-x 4 zhaoyao zhaoyao 4.0K  9月 16 14:34 ruoyi-admin
  9. drwxrwxr-x 4 zhaoyao zhaoyao 4.0K  9月 16 14:34 ruoyi-common
  10. drwxrwxr-x 4 zhaoyao zhaoyao 4.0K  9月 16 14:34 ruoyi-framework
  11. drwxrwxr-x 4 zhaoyao zhaoyao 4.0K  9月 16 14:34 ruoyi-generator
  12. drwxrwxr-x 4 zhaoyao zhaoyao 4.0K  9月 16 14:34 ruoyi-quartz
  13. drwxrwxr-x 4 zhaoyao zhaoyao 4.0K  9月 16 14:34 ruoyi-system
  14. drwxrwxr-x 7 zhaoyao zhaoyao 4.0K  9月 16 14:33 ruoyi-ui
  15. -rw-rw-r-- 1 zhaoyao zhaoyao 1.6K  9月  8 17:57 ry.bat
  16. -rw-rw-r-- 1 zhaoyao zhaoyao 1.7K  9月  8 17:57 ry.sh
  17. drwxrwxr-x 2 zhaoyao zhaoyao 4.0K  9月  8 17:57 sql
复制代码
然后 执行  mvn clean install -Dmaven.test.skip=true 
提示一大堆,然后就看到这个
  1. [INFO] ruoyi .............................................. SUCCESS [  0.116 s]
  2. [INFO] ruoyi-common ....................................... SUCCESS [  2.147 s]
  3. [INFO] ruoyi-system ....................................... SUCCESS [  0.365 s]
  4. [INFO] ruoyi-framework .................................... SUCCESS [  0.411 s]
  5. [INFO] ruoyi-quartz ....................................... SUCCESS [  0.142 s]
  6. [INFO] ruoyi-generator .................................... SUCCESS [  0.220 s]
  7. [INFO] ruoyi-admin ........................................ SUCCESS [  0.865 s]
  8. [INFO] ------------------------------------------------------------------------
  9. [INFO] BUILD SUCCESS
  10. [INFO] ------------------------------------------------------------------------
  11. [INFO] Total time:  4.402 s
  12. [INFO] Finished at: 2025-09-16T15:02:54+08:00
  13. [INFO] ------------------------------------------------------------------------
复制代码
说明这一步成功了,然后有可能中间提示什么没有ruoyi的文件夹来记录日志,那你手动创建一个 并且给权限就好了。
然后来到后端 
  1. cd ruoyi-admin/target
复制代码
再执行 
  1. java -jar ruoyi-admin.jar
复制代码
就看到了如下效果
[code]java -jar ruoyi-admin.jarApplication Version: 3.9.0Spring Boot Version: 2.5.15//////////////////////////////////////////////////////////////////////                          _ooOoo_                               ////                         o8888888o                              ////                         88" . "88                              ////                         (| ^_^ |)                              ////                         O\  =  /O                              ////                      ____/`---'\____                           ////                    .'  \\|     |//  `.                         ////                   /  \\|||  :  |||//  \                        ////                  /  _||||| -:- |||||-  \                       ////                  |   | \\\  -  /// |   |                       ////                  | \_|  ''\---/''  |   |                       ////                  \  .-\__  `-`  ___/-. /                       ////                ___`. .'  /--.--\  `. . ___                     ////              ."" '<  `.___\__/___.'  >'"".                  ////            | | :  `- \`.;`\ _ /`;.`/ - ` : | |                 ////            \  \ `-.   \_ __\ /__ _/   .-` /  /                 ////      ========`-.____`-.___\_____/___.-`____.-'========         ////                           `=---='                              ////      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        ////             佛祖保佑       永不宕机      永无BUG               //////////////////////////////////////////////////////////////////////15:07:28.893 [background-preinit] INFO  o.h.v.i.util.Version - [,21] - HV000001: Hibernate Validator 6.2.5.Final15:07:28.894 [main] INFO  c.r.RuoYiApplication - [logStarting,55] - Starting RuoYiApplication using Java 21.0.8 on lnb000597chn with PID 73476 (/home/zhaoyao/script/java/RuoYi-Vue/ruoyi-admin/target/ruoyi-admin.jar started by zhaoyao in /home/zhaoyao/script/java/RuoYi-Vue/ruoyi-admin/target)15:07:28.895 [main] DEBUG c.r.RuoYiApplication - [logStarting,56] - Running with Spring Boot v2.5.15, Spring v5.3.3915:07:28.895 [main] INFO  c.r.RuoYiApplication - [logStartupProfileInfo,686] - The following 1 profile is active: "druid"15:07:30.300 [main] INFO  o.a.c.h.Http11NioProtocol - [log,168] - Initializing ProtocolHandler ["http-nio-8080"]15:07:30.302 [main] INFO  o.a.c.c.StandardService - [log,168] - Starting service [Tomcat]15:07:30.302 [main] INFO  o.a.c.c.StandardEngine - [log,168] - Starting Servlet engine: [Apache Tomcat/9.0.108]15:07:30.341 [main] INFO  o.a.c.c.C.[.[.[/] - [log,168] - Initializing Spring embedded WebApplicationContext15:07:30.811 [main] DEBUG c.r.f.s.f.JwtAuthenticationTokenFilter - [init,242] - Filter 'jwtAuthenticationTokenFilter' configured for use15:07:31.283 [main] INFO  c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1} inited15:07:31.697 [main] DEBUG c.r.s.m.S.selectDictDataList - [debug,135] - ==>  Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data WHERE status = ? order by dict_sort asc15:07:31.803 [main] DEBUG c.r.s.m.S.selectDictDataList - [debug,135] - ==> Parameters: 0(String)15:07:31.820 [main] DEBUG c.r.s.m.S.selectDictDataList - [debug,135] -   Preparing: select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config15:07:32.186 [main] DEBUG c.r.s.m.S.selectConfigList - [debug,135] - ==> Parameters: 15:07:32.188 [main] DEBUG c.r.s.m.S.selectConfigList - [debug,135] -   Preparing: select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark from sys_job15:07:32.565 [main] DEBUG c.r.q.m.S.selectJobAll - [debug,135] - ==> Parameters: 15:07:32.567 [main] DEBUG c.r.q.m.S.selectJobAll - [debug,135] -

相关推荐

您需要登录后才可以回帖 登录 | 立即注册