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

相关推荐
Lichenpar14 小时前
Springboot采用FastJson2作为MessageConverter时,配置的全局日期类型序列化转换BUG
java·开发语言·bug
Irene19911 天前
AI 找 bug 的局限性 和 Deepseek 优势明显
bug
癫狂的兔子2 天前
【bug】【Python】pandas中的DataFrame.to_excel()和ExcelWriter的区别
python·bug
癫狂的兔子2 天前
【BUG】【Python】【Spider】Compound class names are not allowed.
开发语言·python·bug
netkiller-BG7NYT2 天前
阿里云语音合成CosyVoice重大BUG被我发现了
bug
马猴烧酒.3 天前
【Mybatis出现bug】应为 <statement> 或 DELIMITER,得到 ‘id‘
java·bug·mybatis
请叫我大虾3 天前
发现一个jdk中ArrayList的小BUG
android·java·bug
离离茶3 天前
【笔记1-10】Qt bug记录:dockwidget通过raise在最前面显示,toolbar的拓展菜单失效
笔记·qt·bug
测试_AI_一辰3 天前
Agent & RAG 测试工程笔记 01:Tool Calling 跑通 + 本地 PDF 接入(智谱 GLM)
人工智能·笔记·功能测试·自动化·bug
癫狂的兔子4 天前
【BUG】【Python】清除字符串空格问题
bug