求大神帮忙解决个异常,在线等

小小笨蚂蚁 2014-12-01 09:48:25
ERROR [com.opensymphony.xwork2.spring.SpringObjectFactory] - <Error building bean>
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'java.lang.Integer': Unsatisfied dependency expressed through constructor argument with index 0 of type [int]: : No matching bean of type [int] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [int] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
...全文
199 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
多木多多木 2014-12-02
  • 打赏
  • 举报
回复
哥们,可能问题在这句oSuchBeanDefinitionException: No matching bean of type [int] found for dependency:,看下你的xml配置文件,是不是少配置了什么实体类,或者实体类都配置好了少配置了什么属性。如果是hibernate的实体类和数据库映射文件的话,需要注意类型不能写int,需要写Integer
小小笨蚂蚁 2014-12-01
  • 打赏
  • 举报
回复
引用 1 楼 rui888 的回复:
'java.lang.Integer 和 int 转换出问题。
我是在action写了个算积分的方法,没有分数的进方法跳转页面没问题。有分数的进方法一直到跳转页面都没问题,然后一跳转就抛错了 ,但界面显示的是正确的~会不会是配置里的问题 ?
tony4geek 2014-12-01
  • 打赏
  • 举报
回复
'java.lang.Integer 和 int 转换出问题。

62,621

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧