警告: 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配置报错的更多相关文章

  1. spring框架中beans.xml文件报错XmlBeanDefinitionStoreException

    第一次构建spring,实现简单的注入方式,就发生了beans.xml文件报错,报错信息如下图 org.springframework.beans.factory.xml.XmlBeanDefinit ...

  2. 解决eclipse spring配置报错:cvc-elt.1: Cannot find the declaration of element

    解决eclipse spring配置报错:cvc-elt.1: Cannot find the declaration of element 'beans'.Referenced file conta ...

  3. maven 的 pom.xml 文件报错:ArtifactTransferException: Failure to transfer

    因为maven下载依赖jar包时,特别慢,所以取消了下载过程,再次打开eclipse时,maven的pom.xml文件报错如下: ArtifactTransferException: Failure ...

  4. 解决:eclipse导入android时工程下没有R文件的问题,以及style.xml文件报错

    解决:eclipse导入android时工程下没有R文件的问题,以及style.xml文件报错

  5. java maven项目 pom.xml plugin 报错, build path 找不到 jconsole-1.8.0.jar 和 tools-1.8.0.jar 包

    maven项目pom.xml突然报错,在Java Build Path 中并没有引用的jar包出现在了Maven Dependencies的依赖包中. 这个错误直接导致了pom.xml文件中 < ...

  6. Maven-pom.xml文件报错 Plugin execution not covered by lifecycle configuration

    问题: Eclipse中新导入的项目pom.xml文件报错: Plugin execution not covered by lifecycle configuration: org.jacoco:j ...

  7. 报错记录(xml抬头报错)

    报错记录(xml抬头报错) Referenced file contains errors (http://www.springframework.org/schema/beans/spring-be ...

  8. 新导入的eclipse项目报错,找不到java包,找不到web.xml文件报错。

    新导入的项目可能会出现报错,特别是web项目.我这里提供一种解决方法: 1.右击项目,选择“属性” 2.选择 Resource->java build path->libraries 图中 ...

  9. dubbo控制器xml文件报错

    在配置dubbo服务的过程中,经常会遇到虽然程序能够跑起来,但是配置文件一堆红叉,虽然不影响功能,但是确实很让人恶心. 报错信息如下: Multiple annotations found at th ...

随机推荐

  1. SQL Server如何查看存储过程的执行计划

    有时候,我们需要查看存储过程的执行计划,那么我们有什么方式获取存储过程的历史执行计划或当前的执行计划呢? 下面总结一下获取存储过程的执行计划的方法. 1:我们可以通过下面脚本查看存储过程的执行计划,但 ...

  2. 3-3 用户管理-新建用户useradd和passwd

    3.用户管理 终端命令 提示:创建用户/删除用户/修改其他用户密码的终端命令都需要通过sudo执行 3.1创建用户/修改密码/删除用户 序号 命令 作用 说明 01 useradd -m -g 组 新 ...

  3. 对于Python语音性能的一些个人见解

    虽然运行速度慢是 Python 与生俱来的特点,大多数时候我们用 Python 就意味着放弃对性能的追求.但是,就算是用纯 Python 完成同一个任务,老手写出来的代码可能会比菜鸟写的代码块几倍,甚 ...

  4. JVM-6-垃圾回收算法

    三如何垃圾回收   GC(Garbage Collection)垃圾回收算法 标记清除    速度快,但是会产生内存碎片: 标记整理    解决了标记清除内存碎片的问题,但是每次都得移动对象,因此成本 ...

  5. golang中的viper示例

    这是第二次实操viper了, 年纪大了就多练练,才能记住. http://go.coder55.com/article/6589 https://github.com/spf13/viper pack ...

  6. JSON格式日期的转换

    扒来的链接: https://blog.csdn.net/zhang33565417/article/details/99676975 感谢这位哥们儿的分享!

  7. 《icra16_slam_tutorial_tardos.pdf》

    icra16_slam_tutorial_tardos.pdf EKF: https://www.cnblogs.com/gaoxiang12/p/5560360.html 7. 小结 卡尔曼滤波是递 ...

  8. 使用Xmanager分析Java内存情况

    今天是想看下程序在正式环境中,内存使用回收的情况,于是开始. 1.首先下载Xmanager,Xshell,然后在Xshell-设置-隧道中设置转发X11连接到Xmanager: 2.开始布置Linux ...

  9. 《细说PHP》第四版 样章 第18章 数据库抽象层PDO 11

    18.8.3  完美分页类的代码实现 分页类的编写除了需要使用在18.8.2节中提供的可以操作的3个成员方法,还需要更多的成员,但其他的成员方法和成员属性只需要内部使用,并不需要用户在对象外部操作,所 ...

  10. 一、Mybatis配置详解

    Mybatis配置详解 XML配置文件层次结构 下图展示了mybatis-config.xml的全部配置元素 properties元素 properties是一个配置属性的元素,让我们能在配置文件的上 ...