Selaa lähdekoodia

Merge remote-tracking branch 'origin/dev' into dev

yuxiaobin 7 vuotta sitten
vanhempi
commit
99ef1a2487

+ 17 - 2
CHANGELOG.md

@@ -1,7 +1,22 @@
 # CHANGELOG
 
 
-## [v2.1.7] 2017.12.11 代号:清风徐来 , 该版本号存在分页 asc bug 请改为 2.1.7-SNAPSHOT  
+`## [v2.1.8-SNAPSHOT] 2017.12.28   
+- 返回Map自动下划线转驼峰
+- kotlin entity 静态常量支持
+- 优化 pagination 构造模式
+- Merge pull request #201
+- fix: selectByMap @alexqdjay
+- 增加sqlRuner测试用例,修复selectObjs只获取一个字段的bug
+- 新增 BlobTypeHandler
+- 去掉参数map的初始大小配置
+- 增加.editorconfig,模板空格问题修复.
+- Hikaricp连接池无法打印sql
+- 全局中去掉了路径,mapperLocations不可缺少了.
+- k 神 全部覆盖测试用例
+
+
+## [v2.1.7] 2017.12.11 代号:清风徐来 , 该版本号存在 bug 请改为 2.1.8-SNAPSHOT +   
 - 枚举处理:基本类型,Number类型,String类型
 - IGDRW:源码注释错误,容易给人误导 注释错误问题
 - 炮灰 PR !42:添加分页构造方法重载 添加分页构造方法重载
@@ -14,7 +29,7 @@
 - bugfix for logic delete sql injector
 - 添加多个排序字段支持
 - fixed github #185:2.0.2版本 自增主键 批量插入问题 pr
-- 其他优化
+- 其他优化`
 
 
 ## [v2.1.6] 2017.11.22 代号:小秋秋之吻

+ 4 - 3
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/enums/IEnumTypeHandler.java → mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/handlers/EnumTypeHandler.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.baomidou.mybatisplus.enums;
+package com.baomidou.mybatisplus.handlers;
 
 import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
@@ -23,6 +23,7 @@ import java.sql.SQLException;
 import org.apache.ibatis.type.BaseTypeHandler;
 import org.apache.ibatis.type.JdbcType;
 
+import com.baomidou.mybatisplus.enums.IEnum;
 import com.baomidou.mybatisplus.toolkit.EnumUtils;
 
 /**
@@ -33,11 +34,11 @@ import com.baomidou.mybatisplus.toolkit.EnumUtils;
  * @author hubin
  * @Date 2017-10-11
  */
-public class IEnumTypeHandler<E extends Enum<?> & IEnum> extends BaseTypeHandler<IEnum> {
+public class EnumTypeHandler<E extends Enum<?> & IEnum> extends BaseTypeHandler<IEnum> {
 
     private Class<E> type;
 
-    public IEnumTypeHandler(Class<E> type) {
+    public EnumTypeHandler(Class<E> type) {
         if (type == null) {
             throw new IllegalArgumentException("Type argument cannot be null");
         }

+ 1 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/spring/MybatisSqlSessionFactoryBean.java

@@ -478,7 +478,7 @@ public class MybatisSqlSessionFactoryBean implements FactoryBean<SqlSessionFacto
             for (Class cls : classes) {
                 if (cls.isEnum()) {
                     if (IEnum.class.isAssignableFrom(cls)) {
-                        typeHandlerRegistry.register(cls.getName(), "com.baomidou.mybatisplus.enums.IEnumTypeHandler");
+                        typeHandlerRegistry.register(cls.getName(), "com.baomidou.mybatisplus.handlers.EnumTypeHandler");
                     } else {
                         // 使用原生 EnumOrdinalTypeHandler
                         typeHandlerRegistry.register(cls.getName(), "org.apache.ibatis.type.EnumOrdinalTypeHandler");