Prechádzať zdrojové kódy

增加个空Mapper.

聂秋秋 6 rokov pred
rodič
commit
dcd111e987

+ 2 - 2
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/config/GlobalConfig.java

@@ -21,7 +21,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
 import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
 import com.baomidou.mybatisplus.core.injector.ISqlInjector;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.mapper.Mapper;
 import lombok.AccessLevel;
 import lombok.Data;
 import lombok.Setter;
@@ -75,7 +75,7 @@ public class GlobalConfig implements Serializable {
     /**
      * Mapper父类
      */
-    private Class<?> superMapperClass = BaseMapper.class;
+    private Class<?> superMapperClass = Mapper.class;
     /**
      * 缓存当前Configuration的SqlSessionFactory
      */

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/mapper/BaseMapper.java

@@ -80,7 +80,7 @@ import java.util.Map;
  * @author hubin
  * @since 2016-01-23
  */
-public interface BaseMapper<T> {
+public interface BaseMapper<T> extends Mapper<T> {
 
     /**
      * 插入一条记录

+ 26 - 0
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/mapper/Mapper.java

@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2011-2019, hubin (jobob@qq.com).
+ * <p>
+ * 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
+ * <p>
+ * https://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.
+ */
+
+package com.baomidou.mybatisplus.core.mapper;
+
+/**
+ * 顶级Mapper
+ *
+ * @author nieqiurong 2019/4/13.
+ */
+public interface Mapper<T> {
+
+}