hutool bug

Hutool参考文档

不用随便升级版本

版本5.8

1: 不要用 ReflectUtil.newInstance(cName); * 和spring 部分框架整合 ,子类转换为父类或者接口失败,报转换失败的错误

https://gitee.com/dromara/hutool/issues/I18NCR?skip_mobile=true

改成使用下面的方法

/**
* 创建类实例
* hutools 5.8的版本还在bug
* @paramcName
* @return
*/

public static Object classNewObj(String cName){

Object re=null;

// 使用类的全限定名来加载类

try {

Class<?> clazz = Class.forName (cName);

// 创建类的实例

re= clazz.newInstance();

} catch (Exception e) {

UtilRunTrace.excepCallerLogError ("classNewObj error",e);

}

return re;

}

2:版本升级后项目出现问题

<ver.hutool>5.7.22</ver.hutool>

<ver.hutool>5.8.32</ver.hutool>

Entity.toBean(new HashMap<String,Object>(),isToCamelCase);

查看底层方法 驼峰转换失败。原来5.7方法可以 后面改飞了

相关推荐
东巴图3 小时前
分解如何利用c++修复小程序的BUG
开发语言·c++·bug
workflower3 天前
Fundamentals of Architectural Styles and patterns
开发语言·算法·django·bug·结对编程
lvchaoq3 天前
记录小程序真机bug,而模拟器无法复现
小程序·bug
喜欢便码3 天前
禅道提交bug的几种状态
bug
从前慢,现在也慢3 天前
(3)Bug篇
学习·bug·测试
西柚小萌新4 天前
【Bug:docker】--Docker国内镜像源加载失败
docker·容器·bug
初圣魔门首席弟子6 天前
c++ bug 记录(merge函数调用时错误地传入了vector对象而非迭代器。)
java·c++·bug
Qiuner6 天前
历劫波,明真我——Debug Commune
ai·开源·bug·debug·信息差·信息·交流
川石课堂软件测试8 天前
什么是BUG,你对BUG的了解有多少?
android·linux·服务器·python·功能测试·bug·安全性测试