个人技术分享

图片

一、RuoYi 中集成 SQLite 、MyBatis-Plus

RuoYi 是一个基于 Spring Boot 的权限管理系统,它默认使用 MySQL 作为数据库。如果你想在 RuoYi 中集成 SQLite 数据库,并使用 MyBatis-Plus 作为 ORM 框架,你需要进行一些配置和代码更改。以下是集成的基本步骤:

  1. 添加依赖:在项目的 pom.xml 文件中添加 MyBatis-Plus 和 SQLite JDBC 驱动的依赖。

 

<!-- MyBatis-Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.1</version>
</dependency>

<!-- SQLite JDBC 驱动 -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.34.0</version>
</dependency>