首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    mybatis-plus

    mybatis-plus 简介 MyBatis-Plus(简称 MP)是一个 MyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率而生。...5、@TableId MyBatis-Plus 在实现增删改查时,会默认将 id 作为主键列,并在插入数据时,默认基于雪花算法的策略生成 id,这个雪花算法在这里就不明讲了。...当然呢,@TableId 的功能,也可以写在 application.yml 配置文件中,配置如下: mybatis-plus: global-config: banner: false db-config...: # 配置MyBatis-Plus操作表的默认前缀 table-prefix: "t_" # 配置MyBatis-Plus的主键策略 id-type: auto # 配置MyBatis日志 configuration...: global-config: banner: false db-config: # 配置MyBatis-Plus操作表的默认前缀 table-prefix: "t_" # 配置MyBatis-Plus

    1K40

    Data Access 之 MyBatis Plus(四)- MyBatis Plus Plugin

    一、MyBatis 的插件机制 MyBatis Plus的插件机制也是基于MyBatis的插件机制;MyBatis通过插件Interceptor可以拦截四大组件相关方法的执行,完成相关数据的动态改变。...newParameterHandler()方法创建 这里就是调用了pluginAll()方法 循环所有的拦截器,调用拦截器的plugin()方法,返回代理对象 创建工程 拷贝mybatis-plus-mpg...项目重命名为mybatis-plus-interceptor 二、MyBatis Plus PaginationInnerInterceptor插件 MP的分页插件是PaginationInnerInterceptor...当前页数为:" + teslaPage.getCurrent()); System.out.println("当前页记录数为:" + teslaPage.getSize()); 三、MyBatis Plus...=、包含not、or、子查询,都会拦截 五、MyBatis Plus OptimisticLockerInnerInterceptor 乐观锁插件 什么是乐观锁?

    1.7K30
    领券