社区
Java
帖子详情
关于org.springframework.beans.BeanUtils包的一点问题
hong124262014020
2018-02-27 04:04:13
在还没导入org.springframework.beans.BeanUtils包的时候BeanUtils.populate() BeanUtils报错。
然后在导入org.springframework.beans.BeanUtils之后,BeanUtils.populate()变成了populate()报错。这到底是什么原因啊。
我用的是IDEA
...全文
1308
2
打赏
收藏
关于org.springframework.beans.BeanUtils包的一点问题
在还没导入org.springframework.beans.BeanUtils包的时候BeanUtils.populate() BeanUtils报错。 然后在导入org.springframework.beans.BeanUtils之后,BeanUtils.populate()变成了populate()报错。这到底是什么原因啊。 我用的是IDEA
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hong124262014020
2018-03-01
打赏
举报
回复
引用 1 楼 trocp 的回复:
可能是BeanUtils.populate()这个方法的输入参数类型或个数不匹配。 或者检查引入包的版本
谢谢啊。找到解决方法了。我导入的是spring框架的包,改成 import org.apache.commons.beanutils.BeanUtils;这个就可以用了。
oO临时工Oo
2018-02-27
打赏
举报
回复
可能是BeanUtils.populate()这个方法的输入参数类型或个数不匹配。 或者检查引入包的版本
Spring所需jar
包
org
.
springframework
.
beans
-3.0.0.RELEASE.jar
org
.
springframework
.context.support-3.0.0.RELEASE.jar
org
.
springframework
.context-3.0.0.RELEASE.jar
org
.
springframework
.core-3.0.0.RELEASE.jar
org
.spring...
J2EE项目开发常用Jar
包
.zip
org
.
springframework
.
beans
-3.0.3.RELEASE.jar
org
.
springframework
.context-3.0.3.RELEASE.jar
org
.
springframework
.context.support-3.0.3.RELEASE.jar
org
.
springframework
.core-3.0.3.RELEASE.jar
org
....
【exception】java.lang.NoSuchMethodError:
org
.
springframework
.
beans
.
Beans
.
BeanUtils
使用dubbo、spring-test、junit4编写单元测试时,异常栈打印 cause by:java.lang.NoSuchMethodError:
org
.
springframework
.
beans
.
Beans
.
BeanUtils
原因: jar
包
冲突。 解决: 去掉dubbo中对spring的依赖。
org
.
springframework
.
beans
.
BeanUtils
、
org
.apache.commons.
beanutils
.
BeanUtils
的 copyProperties 用法区别
org
.
springframework
.
beans
.
BeanUtils
、
org
.apache.commons.
beanutils
.
BeanUtils
都提供了copyProperties方法,作用是将一个Bean对象中的数据封装到另一个属性结构相似的Bean对象中 (1)两者的copyProperties方法...
org
.
springframework
.
beans
.
BeanUtils
与
org
.apache.commons.
beanutils
.
BeanUtils
的copyProperties用法区别
org
.
springframework
.
beans
.
BeanUtils
与
org
.apache.commons.
beanutils
.
BeanUtils
都提供了copyProperties方法,作用是将一个Bean对象中的数据封装到另一个属性结构相似的Bean对象中 1)两者的copyProperties方法参数...
Java
50,534
社区成员
85,618
社区内容
发帖
与我相关
我的任务
Java
Java相关技术讨论
复制链接
扫一扫
分享
社区描述
Java相关技术讨论
java
spring boot
spring cloud
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章