We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原先方案使用cglib进行bean deep copy,但是cglib已经停止维护,jdk17+copy时报错, 建议数据对象通过json序列化方式实现deep copy,可选gson/jackson等 建议非数据对象通过hard code 方式deep copy
gson deep copy example: gson.fromJson(gson.toJson(source), targetClazz);
难度低,影响四处copy逻辑和告警通知相关,风险可控
影响代码
删除cglib,增加gson依赖
The text was updated successfully, but these errors were encountered:
加运行参数 --add-opens java.base/java.lang=ALL-UNNAMED,现在不少项目还是用到反射的,如果后续修改我觉得如果可以自己new会更好(性能差了点),或者用下mapstruct
Sorry, something went wrong.
No branches or pull requests
方案描述
原先方案使用cglib进行bean deep copy,但是cglib已经停止维护,jdk17+copy时报错,
建议数据对象通过json序列化方式实现deep copy,可选gson/jackson等
建议非数据对象通过hard code 方式deep copy
应用场景
gson deep copy example: gson.fromJson(gson.toJson(source), targetClazz);
难度风险
难度低,影响四处copy逻辑和告警通知相关,风险可控
影响代码
外部依赖
删除cglib,增加gson依赖
The text was updated successfully, but these errors were encountered: