码迷,mamicode.com
首页 > 其他好文 > 详细

XML配置报错

时间:2019-07-29 14:46:43      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:cell   alt   temp   height   path   err   ESS   复制粘贴   ann   

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘product‘ defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field ‘categroy‘ cannot be found on object of type ‘org.springframework.beans.factory.config.BeanExpressionContext‘ - maybe not public or not valid?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘product‘ defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field ‘categroy‘ cannot be found on object of type ‘org.springframework.beans.factory.config.BeanExpressionContext‘ - maybe not public or not valid?

 出现了如图错误警告,于是翻译了一下,说在找不到categroy,果然自己XML里面配置ref功能出错,复制粘贴对应的id和ref就不会出错了

技术图片

修改二者要一样的名称

技术图片

测试类,运行成功、

技术图片

 

XML配置报错

标签:cell   alt   temp   height   path   err   ESS   复制粘贴   ann   

原文地址:https://www.cnblogs.com/almm/p/11263176.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!