zoukankan      html  css  js  c++  java
  • 当你的Spring IOC 容器(即applicationContext.xml文件)忘记配到web.xml 文件中时

    当你的Spring IOC 容器忘记配到web.xml 文件中时,启动服务器就会报错。

    部分错误如下:

    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.zcd.linkage.services.LinkageService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

    说找不到service层中的Bean,因为我们使用Spring的声明式事务来管理嘛,所以找不到applicationContext.xml文件就会报这样的错误。

  • 相关阅读:
    while循环
    三元运算符
    switch用法
    if判断
    位运算
    逻辑运算符
    赋值运算符和比较运算符
    算术运算符
    数据类型的转换
    线程同步之(条件变量)
  • 原文地址:https://www.cnblogs.com/GooPolaris/p/7919782.html
Copyright © 2011-2022 走看看