亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

SpringBoot中整合MyBatis-Plus的方法示例

 更新時(shí)間:2020年09月10日 11:34:22   作者:Asurplus、  
這篇文章主要介紹了SpringBoot中整合MyBatis-Plus的方法示例,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

MyBatis 框架相信大家都用過,雖然 MyBatis 可以直接在 xml 中通過 SQL 語(yǔ)句操作數(shù)據(jù)庫(kù),很是靈活。但正其操作都要通過 SQL 語(yǔ)句進(jìn)行,就必須寫大量的 xml 文件,很是麻煩。于是 MyBatis-Plus 應(yīng)運(yùn)而生,作為 MyBatis 的增強(qiáng)工具,更是為我們開發(fā)效率得到了質(zhì)的飛躍。

一、簡(jiǎn)介

1、MyBatis

MyBatis 是一款優(yōu)秀的持久層框架,它支持自定義 SQL、存儲(chǔ)過程以及高級(jí)映射。MyBatis 免除了幾乎所有的 JDBC 代碼以及設(shè)置參數(shù)和獲取結(jié)果集的工作。MyBatis 可以通過簡(jiǎn)單的 XML 或注解來配置和映射原始類型、接口和 Java POJO(Plain Old Java Objects,普通老式 Java 對(duì)象)為數(shù)據(jù)庫(kù)中的記錄。

官方文檔:
https://mybatis.org/mybatis-3/zh/index.html

2、MyBatis-Plus

MyBatis-Plus(簡(jiǎn)稱 MP)是一個(gè) MyBatis 的增強(qiáng)工具,在 MyBatis 的基礎(chǔ)上只做增強(qiáng)不做改變,為簡(jiǎn)化開發(fā)、提高效率而生。

官方文檔:
https://mybatis.plus/guide/

二、開發(fā)前戲

1、引入 MyBatis-Plus

在 pom.xml 文件中引入 MyBatis-Plus 所需依賴

<!-- mybatis-plus -->
<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>mybatis-plus-boot-starter</artifactId>
  <version>3.3.1</version>
</dependency>
<!-- mybatis-plus代碼生成器 -->
<dependency>
  <groupId>com.baomidou</groupId>
  <artifactId>mybatis-plus-generator</artifactId>
  <version>3.3.1.tmp</version>
</dependency>
<!-- mybatisPlus Freemarker 模版引擎 -->
<dependency>
  <groupId>org.freemarker</groupId>
  <artifactId>freemarker</artifactId>
</dependency>
<!-- mysql連接 -->
<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <scope>runtime</scope>
</dependency>

freemarker 作為 MyBatis-Plus 自動(dòng)生成代碼時(shí)作為模板使用,還可選用 velocity 作為模板

<dependency>
  <groupId>org.apache.velocity</groupId>
  <artifactId>velocity-engine-core</artifactId>
  <version>2.2</version>
</dependency>

本次我們選用 freemarker 作為模板

2、配置信息

在 application.yml 文件中,配置 mybatis-plus 的信息

# mybatis配置
mybatis-plus:
 # xml文件路徑
 mapper-locations: classpath:mapper/*.xml
 # 實(shí)體類路徑
 type-aliases-package: com.zyxx.sbm.entity
 configuration:
  # 駝峰轉(zhuǎn)換
  map-underscore-to-camel-case: true
  # 是否開啟緩存
  cache-enabled: false
  # 打印sql
  log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 # 全局配置
 global-config:
  # 數(shù)據(jù)庫(kù)字段駝峰下劃線轉(zhuǎn)換
  db-column-underline: true
  # id自增類型(數(shù)據(jù)庫(kù)id自增)
  id-type: 0

我們主要配置了:

  • xml 文件的存放位置
  • 實(shí)體類的存放位置
  • 開啟駝峰轉(zhuǎn)換原則
  • 開啟緩存
  • 打印 sql 日志
  • id 自增策略,有多種策略,如下:
/**
 * 數(shù)據(jù)庫(kù)ID自增
 */
AUTO(0),
/**
 * 該類型為未設(shè)置主鍵類型(注解里等于跟隨全局,全局里約等于 INPUT)
 */
NONE(1),
/**
 * 用戶輸入ID
 * <p>該類型可以通過自己注冊(cè)自動(dòng)填充插件進(jìn)行填充</p>
 */
INPUT(2),

/* 以下3種類型、只有當(dāng)插入對(duì)象ID 為空,才自動(dòng)填充。 */
/**
 * 分配ID (主鍵類型為number或string),
 * 默認(rèn)實(shí)現(xiàn)類 {@link com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator}(雪花算法)
 *
 * @since 3.3.0
 */
ASSIGN_ID(3),
/**
 * 分配UUID (主鍵類型為 string)
 * 默認(rèn)實(shí)現(xiàn)類 {@link com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator}(UUID.replace("-",""))
 */
ASSIGN_UUID(4);

MyBatis-Plus 默認(rèn)的是推特的“雪花算法”,但是這樣生成的主鍵 id 會(huì)比較長(zhǎng),本次我們選擇數(shù)據(jù)庫(kù)自增策略

我們還需要在項(xiàng)目啟動(dòng)類加上

@MapperScan("com.zyxx.sbm.mapper")
@ComponentScan(basePackages = {"com.zyxx"})

掃描我們 mapper 包下面的文件,有時(shí)你會(huì)發(fā)現(xiàn)不在啟動(dòng)類當(dāng)前包下面的文件無法掃描,于是加上第二個(gè)注解,掃描其他文件

3、自動(dòng)生成代碼類

import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine;
import org.apache.commons.lang3.StringUtils;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * 代碼生成器
 *
 * @Author Lizhou
 */
public class CodeGenerator {

  /**
   * <p>
   * 讀取控制臺(tái)內(nèi)容
   * </p>
   */
  public static String scanner(String tip) {
    Scanner scanner = new Scanner(System.in);
    StringBuilder help = new StringBuilder();
    help.append("請(qǐng)輸入" + tip + ":");
    System.out.println(help.toString());
    if (scanner.hasNext()) {
      String ipt = scanner.next();
      if (StringUtils.isNotEmpty(ipt)) {
        return ipt;
      }
    }
    throw new MybatisPlusException("請(qǐng)輸入正確的" + tip + "!");
  }

  /**
   * 自動(dòng)生成代碼
   */
  public static void main(String[] args) {
    // 代碼生成器
    AutoGenerator mpg = new AutoGenerator();
    // TODO 全局配置
    GlobalConfig gc = new GlobalConfig();
    String projectPath = System.getProperty("user.dir");
    // 生成文件的輸出目錄【默認(rèn) D 盤根目錄】
    gc.setOutputDir(projectPath + "/src/main/java");
    // 作者
    gc.setAuthor("lizhou");
    // 是否打開輸出目錄
    gc.setOpen(false);
    // controller 命名方式,注意 %s 會(huì)自動(dòng)填充表實(shí)體屬性
    gc.setControllerName("%sController");
    // service 命名方式
    gc.setServiceName("%sService");
    // serviceImpl 命名方式
    gc.setServiceImplName("%sServiceImpl");
    // mapper 命名方式
    gc.setMapperName("%sMapper");
    // xml 命名方式
    gc.setXmlName("%sMapper");
    // 開啟 swagger2 模式
    gc.setSwagger2(true);
    // 是否覆蓋已有文件
    gc.setFileOverride(true);
    // 是否開啟 ActiveRecord 模式
    gc.setActiveRecord(true);
    // 是否在xml中添加二級(jí)緩存配置
    gc.setEnableCache(false);
    // 是否開啟 BaseResultMap
    gc.setBaseResultMap(true);
    // XML columList
    gc.setBaseColumnList(false);
    // 全局 相關(guān)配置
    mpg.setGlobalConfig(gc);

    // TODO 數(shù)據(jù)源配置
    DataSourceConfig dsc = new DataSourceConfig();
    dsc.setUrl("jdbc:mysql://127.0.0.1:3306/sbm?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=true&characterEncoding=UTF-8");
    dsc.setDriverName("com.mysql.jdbc.Driver");
    dsc.setUsername("root");
    dsc.setPassword("123456");
    mpg.setDataSource(dsc);

    // TODO 包配置
    PackageConfig pc = new PackageConfig();
    // 父包名。如果為空,將下面子包名必須寫全部, 否則就只需寫子包名
    pc.setParent("com.zyxx.sbm");
    // Entity包名
    pc.setEntity("entity");
    // Service包名
    pc.setService("service");
    // Service Impl包名
    pc.setServiceImpl("service.impl");
    mpg.setPackageInfo(pc);

    // TODO 自定義配置
    InjectionConfig cfg = new InjectionConfig() {
      @Override
      public void initMap() {
        // to do nothing
      }
    };
    // 輸出文件配置
    List<FileOutConfig> focList = new ArrayList<>();
    focList.add(new FileOutConfig("/templates/mapper.xml.ftl") {
      @Override
      public String outputFile(TableInfo tableInfo) {
        // 自定義輸入文件名稱
        return projectPath + "/src/main/resources/mapper/" + tableInfo.getEntityName() + "Mapper.xml";
      }
    });
    // 自定義輸出文件
    cfg.setFileOutConfigList(focList);
    mpg.setCfg(cfg);
    mpg.setTemplate(new TemplateConfig().setXml(null));

    // TODO 策略配置
    StrategyConfig strategy = new StrategyConfig();
    // 數(shù)據(jù)庫(kù)表映射到實(shí)體的命名策略,駝峰原則
    strategy.setNaming(NamingStrategy.underline_to_camel);
    // 字?jǐn)?shù)據(jù)庫(kù)表字段映射到實(shí)體的命名策略,駝峰原則
    strategy.setColumnNaming(NamingStrategy.underline_to_camel);
    // 實(shí)體是否生成 serialVersionUID
    strategy.setEntitySerialVersionUID(false);
    // 是否生成實(shí)體時(shí),生成字段注解
    strategy.setEntityTableFieldAnnotationEnable(true);
    // 使用lombok
    strategy.setEntityLombokModel(true);
    // 設(shè)置邏輯刪除鍵
    strategy.setLogicDeleteFieldName("del_flag");
    // TODO 指定生成的bean的數(shù)據(jù)庫(kù)表名
    strategy.setInclude(scanner("表名,多個(gè)英文逗號(hào)分割").split(","));
    // 駝峰轉(zhuǎn)連字符
    strategy.setControllerMappingHyphenStyle(true);
    mpg.setStrategy(strategy);
    // 選擇 freemarker 引擎需要指定如下加,注意 pom 依賴必須有!
    mpg.setTemplateEngine(new FreemarkerTemplateEngine());
    mpg.execute();
  }
}

我們需要改變的就是:

  • 數(shù)據(jù)庫(kù)的連接信息,地址,用戶,密碼
  • controller、service、mapper、xml 等文件的命名規(guī)則
  • 生成文件 controller、service、mapper、xml 文件的存放位置
  • 數(shù)據(jù)庫(kù)與實(shí)體類之間的一些策略配置等

三、開發(fā)進(jìn)行中

1、創(chuàng)建數(shù)據(jù)表

我們創(chuàng)建一個(gè)用戶信息表 user_info


drop table if exists user_info;

/*==============================================================*/
/* Table: user_info                       */
/*==============================================================*/
create table user_info
(
  id          bigint(20) not null auto_increment comment '主鍵id',
  account       varchar(32) comment '賬號(hào)',
  password       varchar(32) comment '密碼',
  name         varchar(32) comment '姓名',
  phone        varchar(11) comment '電話',
  avatar        varchar(255) comment '頭像',
  sex         tinyint(1) comment '性別(0--未知1--男2--女)',
  create_time     datetime comment '創(chuàng)建時(shí)間',
  create_user     bigint(20) comment '創(chuàng)建人',
  status        tinyint(1) default 0 comment '狀態(tài)(0--正常1--凍結(jié))',
  del_flag       tinyint(1) default 0 comment '刪除狀態(tài)(0,正常,1已刪除)',
  primary key (id)
)
type = InnoDB;

alter table user_info comment '用戶信息表';

 2、生成代碼

我們利用剛剛創(chuàng)建的自動(dòng)生成代碼類,生成關(guān)于 user_info 數(shù)據(jù)表的 controller、service、mapper、xml、entity 等文件

生成方法:

  • 運(yùn)行自動(dòng)生成代碼類中的 main 方法
  • 在控制臺(tái)輸入表名 user_info

生成的文件就自動(dòng)放在我們配置的包下面

3、代碼鑒賞

UserInfo.java 文件

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.zyxx.common.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 用戶信息表
 * </p>
 *
 * @author lizhou
 * @since 2020-07-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user_info")
@ApiModel(value="SysUserInfo對(duì)象", description="用戶信息表")
public class UserInfo extends Model<UserInfo> {

  @ApiModelProperty(value = "ID")
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty(value = "登錄賬號(hào)")
  @TableField("account")
  private String account;

  @ApiModelProperty(value = "登錄密碼")
  @TableField("password")
  private String password;

  @ApiModelProperty(value = "姓名")
  @TableField("name")
  private String name;

  @ApiModelProperty(value = "電話")
  @TableField("phone")
  private String phone;

  @ApiModelProperty(value = "頭像")
  @TableField("avatar")
  private String avatar;

  @ApiModelProperty(value = "性別(0--未知1--男2--女)")
  @TableField("sex")
  private Integer sex;

  @ApiModelProperty(value = "狀態(tài)(0--正常1--凍結(jié))")
  @TableField("status")
  private Integer status;

  @ApiModelProperty(value = "創(chuàng)建時(shí)間")
  @TableField("create_time")
  private String createTime;

  @ApiModelProperty(value = "創(chuàng)建人")
  @TableField("create_user")
  private Long createUser;

  @ApiModelProperty(value = "刪除狀態(tài)(0--未刪除1--已刪除)")
  @TableField("del_flag")
  @TableLogic
  private Integer delFlag;

  @Override
  protected Serializable pkVal() {
    return this.id;
  }
}
  • @TableName(“sys_user_info”) ,標(biāo)注表名
  • Model,繼承了 Model 抽象類,并實(shí)現(xiàn)了序列化
  • @ApiModelProperty(value = “ID”),注釋,這是在自動(dòng)生成代碼類中配置了 // 開啟 swagger2 模式 gc.setSwagger2(true);才會(huì)生成的
  • @TableId(value = “id”, type = IdType.AUTO),表明了主鍵自增策略
  • @TableField(“account”),標(biāo)注了數(shù)據(jù)庫(kù)中對(duì)應(yīng)的字段
  • @TableLogic,邏輯刪除字段,表示我們?cè)谡{(diào)用刪除方法時(shí),數(shù)據(jù)庫(kù)并不會(huì)物理刪除,而是被改變狀態(tài),查詢的時(shí)候,默認(rèn)不查詢已被刪除的數(shù)據(jù),可以配置邏輯刪除值,默認(rèn)0未刪除,1已刪除
  • pkVal(),方法用于插入返回自增id

UserInfoMapper.java 文件

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zyxx.sbm.entity.UserInfo;

/**
 * <p>
 * 用戶信息表 Mapper 接口
 * </p>
 *
 * @author lizhou
 * @since 2020-07-06
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {

}

繼承了 BaseMapper 抽象類,使得有了 CRUD 的基本方法

UserInfoMapper.xml 文件

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zyxx.sbm.mapper.UserInfoMapper">

  <!-- 通用查詢映射結(jié)果 -->
  <resultMap id="BaseResultMap" type="com.zyxx.sbm.entity.UserInfo">
    <id column="id" property="id" />
    <result column="account" property="account" />
    <result column="password" property="password" />
    <result column="name" property="name" />
    <result column="phone" property="phone" />
    <result column="avatar" property="avatar" />
    <result column="sex" property="sex" />
    <result column="status" property="status" />
    <result column="create_time" property="createTime" />
    <result column="create_user" property="createUser" />
    <result column="del_flag" property="delFlag" />
  </resultMap>

</mapper>
  • namespace,命名空間,指明這個(gè) xml 文件屬于哪一個(gè) mapper 文件
  • BaseResultMap,結(jié)果集,我們可以定義不同的結(jié)果集,來返回我們所需要的數(shù)據(jù)

UserInfoService.java 文件

import com.baomidou.mybatisplus.extension.service.IService;
import com.zyxx.common.utils.LayTableResult;
import com.zyxx.common.utils.ResponseResult;
import com.zyxx.sbm.entity.UserInfo;

/**
 * <p>
 * 用戶信息表 服務(wù)類
 * </p>
 *
 * @author lizhou
 * @since 2020-07-06
 */
public interface UserInfoService extends IService<UserInfo> {

}

  • 繼承了 IService 接口,使得有了 CRUD 的方法
  • 相比 mapper,還有了批量操作的方法

UserInfoServiceImpl.java 文件

import com.zyxx.sbm.entity.UserInfo;
import com.zyxx.sbm.service.UserInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用戶信息表 服務(wù)實(shí)現(xiàn)類
 * </p>
 *
 * @author lizhou
 * @since 2020-07-06
 */
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

}

UserInfoController.java 文件

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用戶信息表 前端控制器
 * </p>
 *
 * @author lizhou
 * @since 2020-07-06
 */
@Controller
@RequestMapping("/user-info")
public class UserInfoController {

}

四、開始使用

1、分頁(yè)查詢

我們?cè)?service 的實(shí)現(xiàn)類中寫一個(gè) 分頁(yè)查詢用戶的方法,listUserInfo()

@Override
public void listUserInfo(Integer page, Integer limit, UserInfo UserInfo) {
  QueryWrapper<SysUserInfo> queryWrapper = new QueryWrapper<>();
  if (StringUtils.isNotBlank(sysUserInfo.getName())) {
    queryWrapper.like("name", sysUserInfo.getName());
  }
  queryWrapper.orderByDesc("create_time");
  IPage<SysUserInfo> iPage = page(new Page<>(page, limit), queryWrapper);
  long total = iPage.getTotal();
  List<UserInfo> list = iPage.getRecords();
}

我們傳入了查詢條件:根據(jù)用戶名稱查詢,再根據(jù)用戶的注冊(cè)時(shí)間倒序排序,最后分頁(yè)查詢

  • iPage.getTotal(),就得到了總數(shù)量,為 long 型
  • iPage.getRecords(),就得到了結(jié)果集,為 List 集合

我們還可以使用 lambda 的方式來寫查詢條件,例如:

queryWrapper.lambda().eq(SysUserInfo::getName, sysUserInfo.getName());

這樣,就能避免寫數(shù)據(jù)庫(kù)字段的時(shí)候?qū)戝e(cuò)了

2、分頁(yè)插件

注意:這時(shí)候,我們查詢數(shù)據(jù),發(fā)現(xiàn)分頁(yè)并沒有起作用,我們還需要配置 MyBatis-Plus 的分頁(yè)插件

創(chuàng)建 MybatisPlusConfig.java 文件

package com.zyxx.common.mybatis;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * mybatis配置
 *
 * @Author Lizhou
 */
@EnableTransactionManagement
@Configuration
public class MybatisPlusConfig {

  /**
   * 分頁(yè)插件
   */
  @Bean
  public PaginationInterceptor paginationInterceptor() {
    return new PaginationInterceptor();
  }
}

這時(shí)候,我們的分頁(yè)就正常了,分頁(yè)默認(rèn)從1開始,所以不用考慮page = (page-1)*limit 才能使用,1-20的數(shù)據(jù),就傳入 1,20,20-40的數(shù)據(jù)就傳入 2,20 就可以了

其它的增刪改查的方法也是使用很方便的,如果涉及到多表聯(lián)查,我們還是在 xml 文件中寫 sql 吧

五、總結(jié)

  • 無侵入:只做增強(qiáng)不做改變,引入它不會(huì)對(duì)現(xiàn)有工程產(chǎn)生影響,如絲般順滑
  • 損耗?。?jiǎn)?dòng)即會(huì)自動(dòng)注入基本 CURD,性能基本無損耗,直接面向?qū)ο蟛僮?/li>
  • 強(qiáng)大的 CRUD 操作:內(nèi)置通用 Mapper、通用 Service,僅僅通過少量配置即可實(shí)現(xiàn)單表大部分 CRUD 操作,更有強(qiáng)大的條件- - 構(gòu)造器,滿足各類使用需求
  • 支持 Lambda 形式調(diào)用:通過 Lambda 表達(dá)式,方便的編寫各類查詢條件,無需再擔(dān)心字段寫錯(cuò)
  • 支持主鍵自動(dòng)生成:支持多達(dá) 4 種主鍵策略(內(nèi)含分布式唯一 ID 生成器 - Sequence),可自由配置,完美解決主鍵問題
  • 支持 ActiveRecord 模式:支持 ActiveRecord 形式調(diào)用,實(shí)體類只需繼承 Model 類即可進(jìn)行強(qiáng)大的 CRUD 操作
  • 支持自定義全局通用操作:支持全局通用方法注入( Write once, use anywhere )
  • 內(nèi)置代碼生成器:采用代碼或者 Maven 插件可快速生成 Mapper 、 Model 、 Service 、 Controller 層代碼,支持模板引擎,更- - 有超多自定義配置等您來使用
  • 內(nèi)置分頁(yè)插件:基于 MyBatis 物理分頁(yè),開發(fā)者無需關(guān)心具體操作,配置好插件之后,寫分頁(yè)等同于普通 List 查詢
  • 分頁(yè)插件支持多種數(shù)據(jù)庫(kù):支持 MySQL、MariaDB、Oracle、DB2、H2、HSQL、SQLite、Postgre、SQLServer 等多種數(shù)據(jù)庫(kù)
  • 內(nèi)置性能分析插件:可輸出 Sql 語(yǔ)句以及其執(zhí)行時(shí)間,建議開發(fā)測(cè)試時(shí)啟用該功能,能快速揪出慢查詢
  • 內(nèi)置全局?jǐn)r截插件:提供全表 delete 、 update 操作智能分析阻斷,也可自定義攔截規(guī)則,預(yù)防誤操作

到此這篇關(guān)于SpringBoot中整合MyBatis-Plus的方法示例的文章就介紹到這了,更多相關(guān)SpringBoot中整合MyBatis-Plus內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論