10 Star 150 Fork 35

杰睿宁 / mybatisplus-plus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

mybatisplus-plus

mybatisplus-plus对mybatisplus的一些功能补充

根据多个字段联合主键增删改查 原生mybatisplus只支持一个主键,mpp支持多个字段联合主键(复合主键)增删改查,mapper需要继承MppBaseMapper
实体类中联合主键的字段需要用@MppMultiId注解修饰
如果需要在service使用多主键相关操作包括saveOrUpdateByMultiId和批量操作updateBatchByMultiId和saveOrUpdateBatchByMultiId,可以直接继承IMppService接口

优化分页插件实现在不分页时进行排序操作 原生mybatisplus分页与排序是绑定的,mpp优化了分页插件,使用MppPaginationInterceptor插件
在不分页的情况下支持排序操作
page参数size设置为-1可实现不分页取全量数据,同时设置OrderItem可以实现排序

自动填充优化功能 & 自动扫描Entity类构建ResultMap功能 原生mybatisplus只能做%s+1和now两种填充,mybatisplus-plus在插入或更新时对指定字段进行自定义复杂sql填充。
需要在实体类字段上用原生注解@TableField设置fill=FieldFill.INSERT fill=FieldFill.UPDATE或fill=FieldFill.INSERT_UPDATE否则不会触发自定义填充
mybatisplus-plus使用@InsertFill注解触发插入时,执行注解中自定义的sql填充实体类字段
mybatisplus-plus使用@UpdateFill注解触发更新时,执行注解中自定义的sql填充实体类字段
还可以自动填充主键字段,解决原生mybatisplus不支持多个主键的问题
使用ColNameUtil.pn静态方法,获取实体类中读取方法对应的列名称

在xml中编写resultmap是件头痛的事,特别是表连接时返回的对象是多样的,如果不按照map返回,分别建resultmap工作量会翻倍。
使用@AutoMap注解entity实体类,就可以在应用启动时解析使用@TableField注解的字段,自动生成scan.mybatis-plus_xxxx为id的resultMap
可以在xml中直接配置使用这个resultMap实例
并且还支持继承关系,扫描实体子类会附加上父类的字段信息一起构建子类的resultmap
对于各种表连接形成的返回实体对象,可以通过继承来生成。通过扫描后自动构建各种resultmap,在xml中引用。

做连表查询时,输入参数往往不是单一的实体类,而是采用更灵活的Map对象,
但map中key参数的名称定义过于随便,可以使用接口定义常量。但原生mybatis在xml中调用静态类方法和变量时需要填写完整的包名不利于大量采用
是否可以像在mybatisplus中使用lambda表达式翻译entity中的列名称
mpp做了封装支持xml的ognl中引入默认包名(为了兼容jdk11 mpp1.7.0的ognl默认包名功能已经删除),并支持lambda定义列名称
例如xml使用以下语句引入map参数中create_time 原生方式

#{create_time}

mpp的默认包名引用接口常量方式(1.7.0此配置已经删除)
配置文件中mpp.utilBasePath可设置ognl默认包名

#{${@ColInfo@createTime}}

mpp的lambda方式(1.7.0中使用@com.MPP@col)

#{${@MPP@col("TestEntity::getCreateTime")}}

从中央库引入jar

    <dependency>
        <groupId>com.github.jeffreyning</groupId>
        <artifactId>mybatisplus-plus</artifactId>
        <version>1.7.4-RELEASE</version>
    </dependency>

在实体类上设置@KeySequence,在插入时对id字段自动填充复杂计算值

@KeySequence("select lpad(max(seqno)+3,10,'0') from test")
@TableName(value = "test")
public class TestEntity {
    @TableId(value = "id", type=IdType.INPUT)
    private Integer id;

1.5.1版本之后需使用@EnableAutoFill注解整体开启自动注入功能 在实体类字段上设置@InsertFill @UpdateFill,插入和更新时使用当前时间填充

    @InsertFill("select now()")
    @UpdateFill("select now()")
    @TableField(value="update_time",fill=FieldFill.INSERT_UPDATE)
    private Date updateTime;

在实体类字段上设置@InsertFill,在插入时对seqno字段自动填充复杂计算值 查询当前最大的seqno值并加3,转换成10位字符串,不够位数时用0填充

    @TableField(value="seqno",fill=FieldFill.INSERT )
    @InsertFill("select lpad(max(seqno)+3,10,'0') from test")
    private String seqno;

在启动类中使用@EnableMPP启动扩展自定义填充功能和自动创建resultmap功能 在启动类中使用@EnableKeyGen启动主键自定义主键填充功能 注意如果自己实现了IKeyGenerator会与@EnableKeyGen冲突

@SpringBootApplication
@EnableMPP
@EnableKeyGen
public class PlusDemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(PlusDemoApplication.class, args);
    }
}

在实体类上使用@AutoMap注解 JoinEntity是TestEntity的子类 @TableName(autoResultMap=true) autoResultMap必须设置为true 父类可以不加@AutoMap,父类设置autoResultMap=true时mybatisplus负责生成resultmap 但原生mybatisplus生成的resultmap的id为mybatis-plus_xxxx没有scan.前缀

@AutoMap
@TableName(autoResultMap=true)
public class JoinEntity extends TestEntity{
    @TableField("some2")
    private String some2;

    public String getSome2() {
        return some2;
    }

    public void setSome2(String some2) {
        this.some2 = some2;
    }

    @Override
    public String toString() {
        return "JoinEntity{" +
                "some2='" + some2 + '\'' +
                '}';
    }
}

配置文件中加入扫描entity路径,多个路径用逗号分隔

mpp:
  entityBasePath: com.github.jeffreyning.mybatisplus.demo.entity

配置文件中加入ognl执行java静态方法的类加载默认路径,多个路径用逗号分隔(1.7.0此配置已经删除)

mpp:
  utilBasePath: com.github.jeffreyning.mybatisplus.demo.common

xml文件中引入自动生成的resultMap & xml中使用省略包名调用静态方法(1.7.0省略包名已经删除,使用com.MPP) & @com.MPP@col通过entity的lambda表达式翻译列名

<?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.github.jeffreyning.mybatisplus.demo.mapper.TestMapper">
    <select id="queryUseRM" resultMap="scan.mybatis-plus_JoinEntity">
        select * from test inner join test2 on test.id=test2.refid
    </select>
    <select id="queryUse" resultMap="scan.mybatis-plus_JoinEntity">
        select * from test inner join test2 on test.id=test2.refid
        where test.create_time <![CDATA[ <= ]]> #{${@com.MPP@col("TestEntity::getCreateTime")}}
        and test.id=#{${@com.MPP@col("TestEntity::getId")}}
    </select>
</mapper>

接口直接返回实例类

@Mapper
public interface TestMapper extends BaseMapper<TestEntity> {
    public List<JoinEntity> queryUseRM();
    public List<JoinEntity> queryUse(Map param);
}

使用ColNameUtil.pn静态方法,获取实体类中读取方法对应的列名称

       System.out.println(ColNameUtil.pn(TestEntity::getCreateTime));
       System.out.println(ColNameUtil.pn(TestEntity::getId));
       System.out.println(ColNameUtil.pn(JoinEntity::getSome2));
       System.out.println(ColNameUtil.pn(JoinEntity::getUpdateTime));

根据多个字段联合主键增删改查 在实例类成员变量上使用@MppMultiId表明联合主键

@TableName("test07")
public class Test07Entity {
    @MppMultiId
    @TableField(value = "k1")
    private Integer k1;

    @MppMultiId
    @TableField(value = "k2")
    private String k2;
    
    @TableField(value = "col1")
    private String col1;
    @TableField(value = "col2")
    private String col2;    

mapper需要继承MppBaseMapper

@Mapper
public interface Test07Mapper extends MppBaseMapper<Test07Entity> {
}

根据多主键增删改查

    public void testMultiId(){
        //id
        Test07Entity idEntity=new Test07Entity();
        idEntity.setK1(1);
        idEntity.setK2("111");
        //del
        test07Mapper.deleteByMultiId(idEntity);
        //add
        test07Mapper.insert(idEntity);
        //query
        Test07Entity retEntity=test07Mapper.selectByMultiId(idEntity);
        retEntity.setCol1("xxxx");
        //update
        test07Mapper.updateByMultiId(retEntity);
    }

service层继承IMppService接口和MppServiceImpl

public interface Test07Service extends IMppService<Test07Entity> {
}
public class Test07ServiceImpl extends MppServiceImpl<Test07Mapper, Test07Entity> implements Test07Service {
}

在service层调用多主键操作

    public void testMultiIdService(){
        //id
        Test07Entity idEntity=new Test07Entity();
        idEntity.setK1(1);
        idEntity.setK2("111");
        //del

        test07Service.deleteByMultiId(idEntity);
        //add
        test07Service.save(idEntity);
        //query
        Test07Entity retEntity=test07Service.selectByMultiId(idEntity);
        retEntity.setCol1("xxxx");
        //update
        test07Mapper.updateByMultiId(retEntity);
    }

根据复合主键进行批量操作和saveOrUpdate操作

    @Test
    public void testSaveOrUpdateByMultiIdService(){
        //id
        Test07Entity idEntity=new Test07Entity();
        idEntity.setK1(6);
        idEntity.setK2("666");
        //del
        test07Service.deleteByMultiId(idEntity);
        //add
        test07Service.saveOrUpdateByMultiId(idEntity);
        //update
        idEntity.setCol1("ccccc");
        test07Service.saveOrUpdateByMultiId(idEntity);

    }

    @Test
    public void testSaveOrUpdateBatchByMultiIdService(){
        //ids
        List<Test07Entity> entityList=new ArrayList<Test07Entity>();
        for(int i=10;i<30;i++){
            Test07Entity idEntity=new Test07Entity();
            idEntity.setK1(i);
            idEntity.setK2(String.valueOf(i*10));
            entityList.add(idEntity);
        }

        //del
        for(Test07Entity idEntity:entityList) {
            test07Service.deleteByMultiId(idEntity);
        }
        //add batch
        test07Service.saveOrUpdateBatchByMultiId(entityList);
        //del
        for(Test07Entity idEntity:entityList) {
            idEntity.setCol1(new Date().toString());
        }
        //update batch
        test07Service.saveOrUpdateBatchByMultiId(entityList);

    }

    @Test
    public void testUpdateBatchByMultiIdService(){
        //ids
        List<Test07Entity> entityList=new ArrayList<Test07Entity>();
        for(int i=50;i<80;i++){
            Test07Entity idEntity=new Test07Entity();
            idEntity.setK1(i);
            idEntity.setK2(String.valueOf(i*10));
            entityList.add(idEntity);
        }

        //del
        for(Test07Entity idEntity:entityList) {
            test07Service.deleteByMultiId(idEntity);
        }
        //add batch
        test07Service.saveOrUpdateBatchByMultiId(entityList);
        //del
        for(Test07Entity idEntity:entityList) {
            idEntity.setCol1(new Date().toString());
        }
        //update batch
        test07Service.updateBatchByMultiId(entityList);

    }

优化分页插件实现在不分页时进行排序操作(1.6.0版本已删除) 使用MppPaginationInterceptor插件

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new MppPaginationInterceptor();
    }

mapper中按照一般分页接口定义,同时支持返回值为list或page对象的写法

@Mapper
public interface TestMapper extends BaseMapper<TestEntity> {
    public List<JoinEntity> queryUseRM(Page page);
}

page参数设置size=-1为全量查询,size>0时正常分页,设置OrderItem进行无论是否分页都实现排序

    public void testOrder(){
        Page page=new Page();

        page.setSize(-1);
        page.addOrder(new OrderItem().setColumn("test.id").setAsc(true));
        page.addOrder(new OrderItem().setColumn("test2.some2").setAsc(true));

        List rp=testMapper.queryUseRM(page);
    }

常见问题说明

报错Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

解决方法:在启动类中使用@EnableMPP注解,一般报Invalid bound statement (not found)都是没有使用@EnableMPP

添加@EnableMPP后启动报错required a single bean, but 2 were found

产生原因:添加@EnableMpp后会启用内置的metaObjectHandler实现类实现自动填充功能,如果旧项目中自行实现了metaObjectHandler会产生required a single bean类似冲突 解决方法:需删掉自定义的继承metaObjectHandler实现的填充功能

如果加了@EnableMPP后仍然报Invalid bound statement (not found)

需要检查是否实现了自定义的SqlSessionFactory,如果实现自定义的SqlSessionFactory则需要手工注入 MppSqlInjector(否则引发Invalid bound statement), MppKeyGenerator(否则无法主键生成), DataAutoFill(否则无法自动填充) 自定义SqlSessionFactory注入示例如下

    public SqlSessionFactory sqlSessionFactory(DataSource dateSource, MybatisPlusProperties properties, MppSqlInjector mppSqlInjector, MppKeyGenerator mppKeyGenerator, DataAutoFill dataAutoFill) throws Exception {
        MybatisSqlSessionFactoryBean bean=new MybatisSqlSessionFactoryBean();
        GlobalConfig globalConfig = properties.getGlobalConfig();
        globalConfig.setSqlInjector(mppSqlInjector);
        globalConfig.setMetaObjectHandler(dataAutoFill);
        globalConfig.getDbConfig().setKeyGenerator(mppKeyGenerator);
        bean.setDataSource(dateSource);
        bean.setGlobalConfig(globalConfig);
        return bean.getObject();
    }

启动时报异常NoSuchFieldException: modifiers

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'com.github.jeffreyning.mybatisplus.conf.PlusConfig': 
Invocation of init method failed; nested exception is java.lang.NoSuchFieldException: modifiers

应该是jdk11与自定义ognl加载机制不兼容导致的。 mybatisplus-plus1.7.0删除了自定义ognl根路径功能,兼容jdk11。

报 not found column for 'id' mybatis-plus的问题,所有叫id的属性都自动注册为主键 1.7.2版本已经解决了此问题,mpp的多主键@MppMultiId可以和mp的单主键@TableId兼容,同时修饰同一个field

启动时日志中有mpp.entityBasePath is null skip scan result map 只是个提示不影响,不想看到提示,mpp.entityBasePath可以配置到entity的包如entityBasePath: com.github.jeffreyning.mybatisplus.demo.entity; 如果xml中有resultMap="scan.mybatis-plus_xxx"才需要配置mpp.entityBasePath

提示java.lang.RuntimeException: not found column for 'xxx' 是由于设置了@MppMultiId的字段没有同时设置@TableField(value = "xxx")导致的

使用@UpdateFill和@InsertFill自动填充时报错提示Cause: java.lang.IllegalArgumentException: argument type mismatch 由于对某些entity中的字段类型没有做转换如LocalDateTime导致自动填充的sql的返回值类型与entity字段类型不相符,mpp1.7.4版本已经解决了此问题,旧版本需修改entity字段类型与sql返回类型一致。

如何整合pagehelper插件

mybatisplus本身有分页常见,如果一定要使用pagehelper插件的话,与原生的mybatisplus有冲突 解决方法为:使用以下代码加载pageHelper(版本为5.1.10)

    @Bean
    ConfigurationCustomizer mybatisConfigurationCustomizer() {
        return new ConfigurationCustomizer() {
            @Override
            public void customize(Configuration configuration) {
                configuration.addInterceptor(new com.github.pagehelper.PageInterceptor());
            }
        };
    }

版本说明 mybatisplus-plus1.7.4优化自动填充时的字段类型转换功能 mybatisplus-plus1.7.3兼容mybatisplus3.5.1+ mybatisplus-plus1.7.2支持mpp的多主键@MppMultiId可以和mp的单主键@TableId兼容,同时修饰同一个field mybatisplus-plus1.7.1支持继承多主键entity

兼容性说明

mybatisplus-plus1.5.0兼容mybatisplus3.3.1(mybatis3.5.3)到最新版mybatisplus3.4.2(mybatis3.5.6) mybatisplus-plus1.5.1与最高到mybatisplus3.4.3.1兼容 (mybatisplus-plus1.5.1与mybatisplus3.4.3不兼容,mybatisplus3.4.3自身有bug无法使用,报sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class) (mybatisplus-plus1.5.1与mybatisplus3.4.3.2不兼容,报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)) mybatisplus-plus1.6.0与mybatisplus3.4.3.2到mybatisplus3.5.2兼容(已经测试到mybatisplus3.5.2 2022118 )(与mybatisplus3.5.3不兼容) mybatisplus-plus1.7.0兼容jdk11(删除了自定义ognl根路径功能)(1.7.0/1.7.1/1.7.2 与mpp1.6.0的兼容范围一致) mybatisplus-plus1.7.3与mybatisplus3.5.1+兼容(已经测试到mybatisplus3.5.3.1 20230129) demo下载 欢迎添加mpp技术交流qq群 1028241274 从群文件中下载各版本demo 或者从网盘中下载demo,下载密码需要搜索"爱好与编程"订阅公众号,回复"plus"获取

mybatisplus-plus 1.7.2 示例工程下载地址 https://pan.baidu.com/s/1-FXzhNWF6c35Nb6KgUXKwA

mybatisplus-plus 1.7.1 示例工程下载地址 https://pan.baidu.com/s/1wJk1xQfs5skqayaihzY_qg

mybatisplus-plus 1.7.0 示例工程下载地址 https://pan.baidu.com/s/1jI5X0xDDUT4L6gl6QijFHA

mybatisplus-plus 1.6.0 示例工程下载地址 https://pan.baidu.com/s/1ZnLBkl27dr6KVg8D_Pn0Jw

mybatisplus-plus 1.5.1 示例工程下载地址 链接:https://pan.baidu.com/s/1XfRy1jrTyOefp3bqiAmNwg

为了助力广大程序员,提供1折购买正版IntelliJ IDEA专业版license服务,加qq942225169购买,加qq时注明idea。

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

mybatisplus-plus对mybatisplus的一些功能补充:根据多个字段联合主键增删改查;优化分页插件实现在不分页时进行排序操作;自动填充优化功能 & 自动扫描Entity类构建ResultMap功能;ognl设置默认包名 展开 收起
Java
Apache-2.0
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/jeffreyning/mybatisplus-plus.git
git@gitee.com:jeffreyning/mybatisplus-plus.git
jeffreyning
mybatisplus-plus
mybatisplus-plus
main

搜索帮助