当前位置: 首页 > news >正文

RuoYi-v4.2 前缀

00x0 目录结构

固定模块生效子pom.xml引用插件,子pom.xml中的东西只有这个模块能用。

在子模块的 pom.xml 里声明的依赖(<dependencies>)或插件(<plugins>),默认只对当前模块自己生效。其他模块如果也想用,必须显式地在自己的 pom.xml 里也写一遍,或者依赖于当前模块。

00x1 数据库连接

# 数据源配置 spring: datasource: #阿里druid作为数据库连接池 type: com.alibaba.druid.pool.DruidDataSource #数据库驱动类 driverClassName: com.mysql.cj.jdbc.Driver druid: # 主库数据源 master: url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: 123456 # 从库数据源 #关闭读写分离 slave: # 从数据源开关/默认关闭 enabled: false url: username: password: # 初始连接数 initialSize: 5 # 最小连接池数量 minIdle: 10 # 最大连接池数量 maxActive: 20 # 配置获取连接等待超时的时间 maxWait: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 timeBetweenEvictionRunsMillis: 60000 # 配置一个连接在池中最小生存的时间,单位是毫秒 minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最大生存的时间,单位是毫秒 maxEvictableIdleTimeMillis: 900000 # 配置检测连接是否有效 validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false #统计url访问 webStatFilter: enabled: true #数据可视化 statViewServlet: #自动注册加载功能 enabled: true # 设置白名单,不填则允许所有访问 allow: #访问路由,自动注册的路由 #自动把url-pattern里面的注册 url-pattern: /druid/* # 控制台管理用户名和密码,默认空 login-username: login-password: #日志记录,他是记录到某个日志中, 日志文件路径:默认输出到项目根目录下的 logs/ 文件夹中,文件名通常为 ruoyi.log 或 sys-console.log。 filter: stat: enabled: true # 慢SQL记录 log-slow-sql: true slow-sql-millis: 1000 merge-sql: true #防火墙过滤,sql wall: config: #允许一次执行多个sql multi-statement-allow: true

00x2 报错

E:\IntelliJ IDEA 2025.3.1\plugins\maven\lib\maven3\bin\mvn.cmd -Didea.version=2025.3.1 -Dmaven.ext.class.path=E:\IntelliJ IDEA 2025.3.1\plugins\maven\lib\maven-event-listener.jar -Djansi.passthrough=true -Dstyle.color=always -Dmaven.repo.local=C:\Users\jc\.m2\repository org.springframework.boot:spring-boot-maven-plugin:2.1.1.RELEASE:run -f pom.xml Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=GBK WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/E:/IntelliJ%20IDEA%202025.3.1/plugins/maven/lib/maven3/lib/guice-5.1.0-classes.jar) WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release [INFO] Scanning for projects... [INFO] [INFO] -----------------------< com.ruoyi:ruoyi-admin >------------------------ [INFO] Building ruoyi-admin 4.2.0 [INFO] from pom.xml [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot:2.1.1.RELEASE:run (default-cli) > test-compile @ ruoyi-admin >>> [WARNING] 1 problem was encountered while building the effective model for org.javassist:javassist:jar:3.20.0-GA during dependency collection step for project (use -X to see details) Downloading from central: https://repo.maven.apache.org/maven2/com/ruoyi/ruoyi-framework/4.2.0/ruoyi-framework-4.2.0.pom Downloading from central: https://repo.maven.apache.org/maven2/com/ruoyi/ruoyi-quartz/4.2.0/ruoyi-quartz-4.2.0.pom Downloading from central: https://repo.maven.apache.org/maven2/com/ruoyi/ruoyi-generator/4.2.0/ruoyi-generator-4.2.0.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.580 s [INFO] Finished at: 2026-04-14T14:14:08+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project ruoyi-admin: Could not collect dependencies for project com.ruoyi:ruoyi-admin:jar:4.2.0 [ERROR] Failed to read artifact descriptor for com.ruoyi:ruoyi-framework:jar:4.2.0 Blocked mirror 镜像被拦截 拦截http://maven.aliyun.com/nexus/content/groups/public/ [ERROR] Caused by: The following artifacts could not be resolved: com.ruoyi:ruoyi-framework:pom:4.2.0 (absent): Could not transfer artifact com.ruoyi:ruoyi-framework:pom:4.2.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [public (http://maven.aliyun.com/nexus/content/groups/public/, default, releases+snapshots)] [ERROR] Failed to read artifact descriptor for com.ruoyi:ruoyi-quartz:jar:4.2.0 [ERROR] Caused by: The following artifacts could not be resolved: com.ruoyi:ruoyi-quartz:pom:4.2.0 (absent): Could not transfer artifact com.ruoyi:ruoyi-quartz:pom:4.2.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [public (http://maven.aliyun.com/nexus/content/groups/public/, default, releases+snapshots)] [ERROR] Failed to read artifact descriptor for com.ruoyi:ruoyi-generator:jar:4.2.0 [ERROR] Caused by: The following artifacts could not be resolved: com.ruoyi:ruoyi-generator:pom:4.2.0 (absent): Could not transfer artifact com.ruoyi:ruoyi-generator:pom:4.2.0 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [public (http://maven.aliyun.com/nexus/content/groups/public/, default, releases+snapshots)] [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
mvn clean install

00x3 改数据库

没有指定自动8.0 <!-- Mysql驱动包 --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency>
<properties> <ruoyi.version>4.2.0</ruoyi.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <shiro.version>1.4.2</shiro.version> <thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version> <mybatis.boot.version>1.3.2</mybatis.boot.version> <druid.version>1.1.14</druid.version> <bitwalker.version>1.19</bitwalker.version> <kaptcha.version>2.3.2</kaptcha.version> <swagger.version>2.9.2</swagger.version> <pagehelper.boot.version>1.2.5</pagehelper.boot.version> <fastjson.version>1.2.60</fastjson.version> <oshi.version>3.9.1</oshi.version> <commons.io.version>2.5</commons.io.version> <commons.fileupload.version>1.3.3</commons.fileupload.version> <poi.version>3.17</poi.version> <velocity.version>1.7</velocity.version> 指定版本号 <mysql-connector.version>5.1.47</mysql-connector.version> </properties>
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql-connector.version}</version> </dependency>

自动8.0

这里我们父类重写了

00x4 启动成功

http://www.jsqmd.com/news/642433/

相关文章:

  • Qt6.8编译路径问题解析:解决QMainWindow文件缺失的三种方案
  • FUTURE POLICE语音模型与Git工作流结合:语音数据版本管理实践
  • 选品牌设计全案策划公司犯难?看这里!
  • 告别枯燥理论:用STM32CubeMx和PWM蜂鸣器,5分钟实现你的第一个嵌入式音乐盒
  • 矽力杰 Silergy SY8003 同步降压转换器 佰祥电子
  • 别让一颗小电阻毁了你的时钟!手把手教你搞定有源晶振的匹配电阻(附LVDS/CMOS选型表)
  • Swift 函数
  • 全文降AI的好处有哪些?推荐3款支持全文处理的降AI工具
  • 在VMware ESXi上部署Proxmox VE的实战指南
  • 2025届必备的六大AI学术网站实测分析
  • GraphMind:用“搭积木”的思路做的概念绘图神器
  • 大模型应用开发实战(4)——智能体经典范式
  • 无线充电效率低?掌握“加五”规则,让充电速度快起来!
  • CV实战:LBP纹理特征在Python中的高效实现与优化
  • 当AI工程进入第三层,我们把积累12年的数据「改造」了一遍
  • 从0手把手教你写AI Skill(附规范目录+可运行代码)
  • 与其他国际口罩品牌对比:回归工业颗粒物防护本质,3M为何更值得重点关注
  • 2026四川学历提升机构实力排行榜:Top8深度测评,帮你精准避坑 - 商业科技观察
  • bge-large-zh-v1.5开源模型实践:符合信创要求的国产AI基础设施部署
  • 终极指南:FakeLocation Xposed模块如何实现应用级虚拟定位
  • MoveIt Servo 如何通过 FollowJointTrajectoryControllerHandle Action Server 通信
  • 了解电爪分类与核心参数,靠谱电爪品牌挑选实用方法 - 品牌2026
  • 2026年中高考将至!揭秘好用的提分技巧,这家权威机构不容错过!
  • ITensors——一个聪明的张量网络库(4)
  • 【多模态大模型知识蒸馏实战指南】:3步压缩ViT+CLIP模型,推理速度提升4.7倍、参数量减少89%(附PyTorch可复现代码)
  • 光伏MPPT专题(2)【讲解】基于改进扰动观察法的光伏MPPT最大功率跟踪算法(自适应步长、大步长、小步长对比)
  • ai coding到底选什么模型?claude,gpt,glm,gemin,KIMI K2.5,MiniMax-M2.7底怎么选,最全总结
  • Samhelper(Sam helper 下载)
  • ITensors——一个聪明的张量网络库(1)
  • ITensors——一个聪明的张量网络库(2)