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方法可以 后面改飞了

相关推荐
phantom_11119 小时前
Cursor 分析 bug 记录
bug·cursor
Direction_Wind2 天前
Flinksql bug: Heartbeat of TaskManager with id container_XXX timed out.
大数据·flink·bug
AIBigModel5 天前
智能情趣设备、爆 bug:可被远程操控。。。
网络·安全·bug
Direction_Wind5 天前
flinksql bug: Received resultset tuples, but no field str
bug
远瞻。5 天前
【bug】diff-gaussian-rasterization Windows下编译 bug 解决
windows·bug
中草药z5 天前
【测试】Bug+设计测试用例
功能测试·测试工具·测试用例·bug·压力测试·测试
我又来搬代码了5 天前
【Android】【bug】Json解析错误Expected BEGIN_OBJECT but was STRING...
android·json·bug
葵野寺6 天前
【软件测试】BUG篇 — 详解
bug·测试
青青子衿越8 天前
微信小程序右上角分享页面找不到路径bug
微信小程序·小程序·bug
刘火锅9 天前
Bug 记录:SecureRandom.getInstanceStrong()导致验证码获取阻塞
spring boot·spring·spring cloud·bug