Skip to content
New issue

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

BeanUtil.beanToMap不能正常解析List #3539

Closed
zhourui9797 opened this issue Apr 9, 2024 · 3 comments
Closed

BeanUtil.beanToMap不能正常解析List #3539

zhourui9797 opened this issue Apr 9, 2024 · 3 comments
Labels

Comments

@zhourui9797
Copy link

zhourui9797 commented Apr 9, 2024

版本情况

JDK版本: openjdk_8_201
hutool版本: 5.8.22(请确保最新尝试是否还有问题)

问题描述(包括截图)

1,BeanUtil.beanToMap不能正常解析List
2,如图调用BeanUtil.beanToMap()方法,并使用驼峰转下划线:
Snipaste_2024-04-09_11-47-56
3,但转换的结果里面list的key的驼峰依然存在并没有转成下划线

@zhourui9797
Copy link
Author

求解决

@zhourui9797 zhourui9797 reopened this Apr 9, 2024
@CherryRum
Copy link
Collaborator

麻烦您提供下最小复现的样例

@looly
Copy link
Member

looly commented Apr 11, 2024

beanToMap是浅复制或转换,因此子对象并不转换。

@looly looly closed this as completed Apr 11, 2024
@looly looly added the question label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants