若依 MyBatis改为MyBatis-Plus

主要内容:升级成mybatis-plus,代码生成也是mybatis-plus版本

跟着我一步一步来,就可完成升级!

检查:启动程序,先保证若依能启动

第一步:添加依赖

        这里需要在两个地方添加,一个是最外面的父工程的pom.xml,一个是ruoyi-common的pom.xml。

        最外面的父工程的pom.xml:

        1.添加版本信息

代码:
<!--        mybatis-plus 版本--><mybatis-pluc.version>3.4.2</mybatis-pluc.version>

        2.添加mybatis-plus依赖

代码:

<!-- mybatis-plus 增强CRUD -->
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.4.2</version>
</dependency>

        ruoyi-common的pom.xml:

        1.直接继承父工程的依赖

第一步验证:

admin的包中的application.yml文件有mybatis-plus的提示,说明依赖弄好啦!

第二步:修改application.yml文件

        1.删除旧的mybatis配置

        2.写入新配置

        

代码:

# MyBatis Plus配置
mybatis-plus:# 搜索指定包别名   根据自己的项目来typeAliasesPackage: com.rchuing.sis.**.domain # 配置mapper的扫描,找到所有的mapper.xml映射文件mapperLocations: classpath*:mapper/**/*Mapper.xml# 加载全局的配置文件configLocation: classpath:mybatis/mybatis-config.xmlglobal-config:enable-sql-runner: truedb-config:id-type: auto

第三步:重写mybatis配置文件

        1.在framework中,找到MybatisConfig文件,然后删除。

        

        2.在刚删除的文件夹下,新建一个MybatisPlus的java文件

        复制已下内容到java文件中:

/*** Mybatis Plus 配置** @author ruoyi*/
@EnableTransactionManagement(proxyTargetClass = true)
@Configuration
public class MybatisPlusConfig
{@Beanpublic MybatisPlusInterceptor mybatisPlusInterceptor(){MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();// 分页插件interceptor.addInnerInterceptor(paginationInnerInterceptor());// 乐观锁插件interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());// 阻断插件interceptor.addInnerInterceptor(blockAttackInnerInterceptor());return interceptor;}/*** 分页插件,自动识别数据库类型 https://baomidou.com/guide/interceptor-pagination.html*/public PaginationInnerInterceptor paginationInnerInterceptor(){PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();// 设置数据库类型为mysqlpaginationInnerInterceptor.setDbType(DbType.MYSQL);// 设置最大单页限制数量,默认 500 条,-1 不受限制paginationInnerInterceptor.setMaxLimit(-1L);return paginationInnerInterceptor;}/*** 乐观锁插件 https://baomidou.com/guide/interceptor-optimistic-locker.html*/public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor(){return new OptimisticLockerInnerInterceptor();}/*** 如果是对全表的删除或更新操作,就会终止该操作 https://baomidou.com/guide/interceptor-block-attack.html*/public BlockAttackInnerInterceptor blockAttackInnerInterceptor(){return new BlockAttackInnerInterceptor();}
}

如图:

到这里Mybatis-plus就升级完成了。但代码生成里面还是以前mybatis的,这里也需要升级一下,方便代码生成。

第四步:把代码生成修改为mybatis-plus版本

1.在generator找到vm中的java文件夹

        

2.修改里面内容:这里直接上代码了,找到对应的直接复制粘贴就行

2.1:domain.java.vm

package ${packageName}.domain;#foreach ($import in $importList)
import ${import};
#end
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.rchuing.sis.common.annotation.Excel;
#if($table.crud || $table.sub)
import com.rchuing.sis.common.core.domain.BaseEntity;
#elseif($table.tree)
import com.fenghuang.common.core.domain.TreeEntity;
#end/*** ${functionName}对象 ${tableName}** @author ${author}* @date ${datetime}*/
#if($table.crud || $table.sub)#set($Entity="BaseEntity")
#elseif($table.tree)#set($Entity="TreeEntity")
#end
@TableName(resultMap = "${packageName}.mapper.${ClassName}Mapper.${ClassName}Result")
public class ${ClassName} extends ${Entity}{
private static final long serialVersionUID = 1L;#foreach ($column in $columns)#if(!$table.isSuperColumn($column.javaField))/** $column.columnComment */#if($column.list)#set($parentheseIndex=$column.columnComment.indexOf("("))#if($parentheseIndex != -1)#set($comment=$column.columnComment.substring(0, $parentheseIndex))#else#set($comment=$column.columnComment)#end#if($parentheseIndex != -1)@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")#elseif($column.javaType == 'Date')@JsonFormat(pattern = "yyyy-MM-dd")@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")#else@Excel(name = "${comment}")#end#end#if($column.isPk == 1)@TableId(value = "$column.columnName",type = IdType.AUTO)#endprivate $column.javaType $column.javaField;#end
#end
#if($table.sub)
/** $table.subTable.functionName信息 */
private List<${subClassName}> ${subclassName}List;#end
#foreach ($column in $columns)#if(!$table.isSuperColumn($column.javaField))#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))#set($AttrName=$column.javaField)#else#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})#endpublic void set${AttrName}($column.javaType $column.javaField){this.$column.javaField = $column.javaField;}public $column.javaType get${AttrName}(){return $column.javaField;}#end
#end#if($table.sub)
public List<${subClassName}> get${subClassName}List(){return ${subclassName}List;}public void set${subClassName}List(List<${subClassName}> ${subclassName}List){this.${subclassName}List = ${subclassName}List;}#end
@Override
public String toString() {return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)#foreach ($column in $columns)#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))#set($AttrName=$column.javaField)#else#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})#end.append("${column.javaField}", get${AttrName}())#end#if($table.sub).append("${subclassName}List", get${subClassName}List())#end.toString();}}

2.2:mapper.java.vm

package ${packageName}.mapper;import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ${packageName}.domain.${ClassName};
#if($table.sub)
import ${packageName}.domain.${subClassName};
#end/*** ${functionName}Mapper接口** @author ${author}* @date ${datetime}*/
public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> {/*** 查询${functionName}** @param ${pkColumn.javaField} ${functionName}主键* @return ${functionName}*/public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});/*** 查询${functionName}列表** @param ${className} ${functionName}* @return ${functionName}集合*/public List<${ClassName}> select${ClassName}List(${ClassName} ${className});/*** 新增${functionName}** @param ${className} ${functionName}* @return 结果*/public int insert${ClassName}(${ClassName} ${className});/*** 修改${functionName}** @param ${className} ${functionName}* @return 结果*/public int update${ClassName}(${ClassName} ${className});/*** 删除${functionName}** @param ${pkColumn.javaField} ${functionName}主键* @return 结果*/public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});/*** 批量删除${functionName}** @param ${pkColumn.javaField}s 需要删除的数据主键集合* @return 结果*/public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);
#if($table.sub)/*** 批量删除${subTable.functionName}** @param ${pkColumn.javaField}s 需要删除的数据主键集合* @return 结果*/public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);/*** 批量新增${subTable.functionName}** @param ${subclassName}List ${subTable.functionName}列表* @return 结果*/public int batch${subClassName}(List<${subClassName}> ${subclassName}List);/*** 通过${functionName}主键删除${subTable.functionName}信息** @param ${pkColumn.javaField} ${functionName}ID* @return 结果*/public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField});
#end
}

2.3:service.java.vm

package ${packageName}.service;import java.util.List;
import ${packageName}.domain.${ClassName};
import com.baomidou.mybatisplus.extension.service.IService;/*** ${functionName}Service接口** @author ${author}* @date ${datetime}*/
public interface I${ClassName}Service extends IService<${ClassName}> {/*** 查询${functionName}** @param ${pkColumn.javaField} ${functionName}主键* @return ${functionName}*/public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});/*** 查询${functionName}列表** @param ${className} ${functionName}* @return ${functionName}集合*/public List<${ClassName}> select${ClassName}List(${ClassName} ${className});/*** 新增${functionName}** @param ${className} ${functionName}* @return 结果*/public int insert${ClassName}(${ClassName} ${className});/*** 修改${functionName}** @param ${className} ${functionName}* @return 结果*/public int update${ClassName}(${ClassName} ${className});/*** 批量删除${functionName}** @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合* @return 结果*/public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s);/*** 删除${functionName}信息** @param ${pkColumn.javaField} ${functionName}主键* @return 结果*/public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField});
}

2.4:serviceimpl.java.vm

package ${packageName}.service.impl;import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
#foreach ($column in $columns)
#if($column.javaField == 'createTime' || $column.javaField == 'updateTime')
import com.rchuing.common.utils.DateUtils;
#break
#end
#end
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
#if($table.sub)
import java.util.ArrayList;
import com.rchuing.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import ${packageName}.domain.${subClassName};
#end
import ${packageName}.mapper.${ClassName}Mapper;
import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service;/*** ${functionName}Service业务层处理** @author ${author}* @date ${datetime}*/
@Service
public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}> implements I${ClassName}Service {@Autowiredprivate ${ClassName}Mapper ${className}Mapper;/*** 查询${functionName}** @param ${pkColumn.javaField} ${functionName}主键* @return ${functionName}*/@Overridepublic ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) {return ${className}Mapper.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField});}/*** 查询${functionName}列表** @param ${className} ${functionName}* @return ${functionName}*/@Overridepublic List<${ClassName}> select${ClassName}List(${ClassName} ${className}) {return ${className}Mapper.select${ClassName}List(${className});}/*** 新增${functionName}** @param ${className} ${functionName}* @return 结果*/
#if($table.sub)@Transactional
#end@Overridepublic int insert${ClassName}(${ClassName} ${className}) {
#foreach ($column in $columns)
#if($column.javaField == 'createTime')${className}.setCreateTime(DateUtils.getNowDate());
#end
#end
#if($table.sub)int rows = ${className}Mapper.insert${ClassName}(${className});insert${subClassName}(${className});return rows;
#elsereturn ${className}Mapper.insert${ClassName}(${className});
#end}/*** 修改${functionName}** @param ${className} ${functionName}* @return 结果*/
#if($table.sub)@Transactional
#end@Overridepublic int update${ClassName}(${ClassName} ${className}) {
#foreach ($column in $columns)
#if($column.javaField == 'updateTime')${className}.setUpdateTime(DateUtils.getNowDate());
#end
#end
#if($table.sub)${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}());insert${subClassName}(${className});
#endreturn ${className}Mapper.update${ClassName}(${className});}/*** 批量删除${functionName}** @param ${pkColumn.javaField}s 需要删除的${functionName}主键* @return 结果*/
#if($table.sub)@Transactional
#end@Overridepublic int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s) {
#if($table.sub)${className}Mapper.delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaField}s);
#endreturn ${className}Mapper.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s);}/*** 删除${functionName}信息** @param ${pkColumn.javaField} ${functionName}主键* @return 结果*/
#if($table.sub)@Transactional
#end@Overridepublic int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) {
#if($table.sub)${className}Mapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField});
#endreturn ${className}Mapper.delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField});}
#if($table.sub)/*** 新增${subTable.functionName}信息** @param ${className} ${functionName}对象*/public void insert${subClassName}(${ClassName} ${className}) {List<${subClassName}> ${subclassName}List = ${className}.get${subClassName}List();${pkColumn.javaType} ${pkColumn.javaField} = ${className}.get${pkColumn.capJavaField}();if (StringUtils.isNotNull(${subclassName}List)){List<${subClassName}> list = new ArrayList<${subClassName}>();for (${subClassName} ${subclassName} : ${subclassName}List){${subclassName}.set${subTableFkClassName}(${pkColumn.javaField});list.add(${subclassName});}if (list.size() > 0){${className}Mapper.batch${subClassName}(list);}}}
#end
}

2.5:sub-domain.java.vm

package ${packageName}.domain;#foreach ($import in $subImportList)
import ${import};
#end
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.rchuing.common.annotation.Excel;
import com.rchuing.common.core.domain.BaseEntity;/*** ${subTable.functionName}对象 ${subTableName}** @author ${author}* @date ${datetime}*/
public class ${subClassName} extends BaseEntity {private static final long serialVersionUID = 1L;#foreach ($column in $subTable.columns)
#if(!$table.isSuperColumn($column.javaField))/** $column.columnComment */
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($parentheseIndex != -1)@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
#elseif($column.javaType == 'Date')@JsonFormat(pattern = "yyyy-MM-dd")@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
#else@Excel(name = "${comment}")
#end
#endprivate $column.javaType $column.javaField;#end
#end
#foreach ($column in $subTable.columns)
#if(!$table.isSuperColumn($column.javaField))
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
#set($AttrName=$column.javaField)
#else
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
#endpublic void set${AttrName}($column.javaType $column.javaField) {this.$column.javaField = $column.javaField;}public $column.javaType get${AttrName}() {return $column.javaField;}
#end
#end@Overridepublic String toString() {return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
#foreach ($column in $subTable.columns)
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
#set($AttrName=$column.javaField)
#else
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
#end.append("${column.javaField}", get${AttrName}())
#end.toString();}
}

到这里就升级完成。

下面进行测试:

1.

2.

3.如果看到mybatis的东西,说明升级成功!

注意: 

1.这里可能有些包的路径不对,把爆红的包删除,重新导入就可!

2.因为实际项目路径不同,这里可能需要手动修改!

3.在BaseEntity类中

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/69346.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【C语言】——调试技巧

目录 ​编辑 ①前言 1.什么是Bug&#xff1f; 2.什么是调试&#xff1f; 2.1调试的基本步骤 2.2Release与Debug 3.常用快捷键 4.如何写出好的代码 4.1常见的coding技巧 &#x1f449;assert() &#x1f449;const() const修饰指针: ①前言 调试是每个程序员都…

算法题打卡day56-编辑距离 | 583. 两个字符串的删除操作、72. 编辑距离

583. 两个字符串的删除操作 - 力扣&#xff08;LeetCode&#xff09; 状态&#xff1a;查看思路后AC。 和查找子序列的操作类似&#xff0c;但是考虑的是删除操作。代码如下&#xff1a; class Solution { public:int minDistance(string word1, string word2) {int len1 wor…

机器学习前沿:改进自身缺陷,满足新战略

前机械师&#xff08; 来源) 一、说明 机器学习在人工智能历史上扮演重要角色&#xff0c;然而&#xff0c;存在问题也不少。为了适应新时代和新任务&#xff0c;不做出重大改进是不可能的&#xff0c;本篇就一些突出问题和改进做出讨论。以便读者掌握未来的思路和方向。 二、机…

SSM框架-spring

SSM框架参考 spring Spring源码 Spring6课程笔记

ClickHouse多级磁盘和冷热数据分离实践

特别注意 ck可以大小写区分也可以不区分ck 配置文件中的各个卷的是有顺序的。 开启远程访问 vim /etc/clickhouse-server/config.xml <listen_host>0.0.0.0</listen_host> 前言 ClickHouse 的冷热数据分离和ES的类似&#xff0c;可以选择冷数据跑在哪个数据目录…

HOperatorSet.GenRandomRegions 有内存泄漏或缓存,释放不掉

开发环境 VS2022 win7 halcon12 halcon18 随机生成100个园 不释放 private void butTemp_Click(object sender, EventArgs e) { butTemp.Enabled false; HOperatorSet.SetSystem("clip_region", "false"); …

【Lychee图床】本地电脑搭建私人图床,公网远程访问

文章目录 1.前言2. Lychee网站搭建2.1. Lychee下载和安装2.2 Lychee网页测试2.3 cpolar的安装和注册 3.本地网页发布3.1 Cpolar云端设置3.2 Cpolar本地设置 4.公网访问测试5.结语 1.前言 图床作为图片集中存放的服务网站&#xff0c;可以看做是云存储的一部分&#xff0c;既可…

springboot配置统一返回结果类

目录结构&#xff1a; Result类&#xff1a; package com.xxxx.common.result;import lombok.Data;Data public class Result<T> {//状态码private Integer code;//信息private String message;//数据private T data;//构造私有化private Result() { }//设置数据,返回对…

报文信息转换器

HttpMessageConverter HttpMessageConverter:报文信息转换器&#xff0c;将请求报文转换为Java对象&#xff0c;或将Java对象转换为响应报文。它提供了两个注解和两个类型&#xff1a; RequestBody, ResponseBody, RequestEntity, ResponseEntity(响应用的较多) 准备 创建模块并…

行业追踪,2023-08-30

自动复盘 2023-08-30 凡所有相&#xff0c;皆是虚妄。若见诸相非相&#xff0c;即见如来。 k 线图是最好的老师&#xff0c;每天持续发布板块的rps排名&#xff0c;追踪板块&#xff0c;板块来开仓&#xff0c;板块去清仓&#xff0c;丢弃自以为是的想法&#xff0c;板块去留让…

WebStorm使用PlantUML

虽然 WebStorm 没有官方的 PlantUML 插件&#xff0c;但我们可以使用第三方插件 PlantUML Integration 来实现在 WebStorm 中使用 PlantUML。 以下是使用 PlantUML Integration 插件&#xff0c;在 WebStorm 中设计一个 Vue 模块的步骤&#xff1a; 安装 PlantUML Integratio…

从一到无穷大 #13 How does Lindorm TSDB solve the high cardinality problem?

本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。 本作品 (李兆龙 博文, 由 李兆龙 创作)&#xff0c;由 李兆龙 确认&#xff0c;转载请注明版权。 文章目录 引言优势挑战系统架构细节/优化存储引擎索引写入查询 经验Ablation Study总结 引言 …

一文速学-让神经网络不再神秘,一天速学神经网络基础(七)-基于误差的反向传播

前言 思索了很久到底要不要出深度学习内容&#xff0c;毕竟在数学建模专栏里边的机器学习内容还有一大半算法没有更新&#xff0c;很多坑都没有填满&#xff0c;而且现在深度学习的文章和学习课程都十分的多&#xff0c;我考虑了很久决定还是得出神经网络系列文章&#xff0c;…

期货-股票交易规则

交易时间 港股&#xff1a;9:00~9:20 集合竞价&#xff0c;9:3012:00&#xff0c;13:0016:00 持续交易&#xff0c;16:00~16:10 随机收市竞价沪股&#xff1a;9:00~9:25 集合竞价&#xff0c;9:3011:30&#xff0c;13:0015:00 持续交易&#xff0c;11:30~12:00 交易申报深股&a…

基于边缘物联网关的智慧零售应用方案

推动经济健康发展增长&#xff0c;就要持续促进和扩大消费需求&#xff0c;提升消费体验。随着物联网技术的普及&#xff0c;面向日常消费的智慧零售应用迎来爆发式增长&#xff0c;不仅可以提升消费者消费体验&#xff0c;还可以提高商家营销和管理效率。本篇就为大家简单介绍…

Ubuntu入门04——目录与文件

目录 1.显示当前工作目录 2.更改目录 3.创建工作目录 4.删除工作目录 5.移动文件或者文件夹 6.文件夹and文件查看命令 7. 回到根目录&#xff0c;回到上一级 8.删除工作目录 9.查看目录和文件 10.以树状图列出目录内容 11.文件查找 12.在数据库中查找文件或目录 1…

抖音设计系统Semi Design:解构、原理与实现

摘要&#xff1a; 本文将深入探讨抖音设计系统Semi Design&#xff0c;阐述其定义、分析其原理&#xff0c;并通过详细代码展示其实现方法。本文旨在为设计师、开发人员和相关领域的研究者提供有关Semi Design的深入理解和实用指南。 引言 抖音&#xff0c;作为一款全球流行的…

uni-app:实现右侧弹窗

效果&#xff1a; 代码&#xff1a; <template><view class"container"><button click"showModal true">点击按钮</button><view class"modal-overlay" v-if"showModal" click"closeModal">…

Camx-Dump Raw Frames

1.dump eeprom data vendor/qcom/proprietary/camx/src/settings/common/camxsettings.xml 两种方式dump数据&#xff1a; 一. Push a configuration file to/vendor/etc/camera/camxoverridesettings.txt adb shell "echo dumpSensorEEPROMDataTRUE >> /vendor/e…

mobx和redux的区别?如何选择?

一、 mobx和redux的区别 Redux通常适用于大型应用程序&#xff0c;而MobX更适合小到中型应用程序&#xff0c;这是因为它们在设计理念和使用方式上有一些区别&#xff0c;这些区别在不同规模和复杂度的应用中产生了影响&#xff1a; Redux&#xff1a; 严格的架构&#xff1a…