zoukankan      html  css  js  c++  java
  • BeanDefinitionStoreException

    1. 异常摘要
    2. org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML   
    3. document from class path resource [com/herman/ss/controller]; nested exception is java.io.FileNotFoundException:  
    4.  class path resource [com/herman/ss/controller] cannot be opened because it does not exist  

    解决办法:没有找配置文件为controller的xml,修改一下配置文件名字即可。

     
      1. <init-param>  
      2.     <param-name>contextConfigLocation</param-name>  
      3.     <param-value>classpath:com/herman/ss/config/testAjax.xml</param-value>  
      4. </init-param>  

    异常详情:

    十二月 21, 2016 8:55:12 下午 org.apache.catalina.core.ApplicationContext log
    严重: StandardWrapper.Throwable
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private demo.service.CityService demo.controller.DemoController.cityService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [demo.service.CityService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

    Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private demo.service.CityService demo.controller.DemoController.cityService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [demo.service.CityService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
    ... 29 more
    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [demo.service.CityService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject()}
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)

  • 相关阅读:
    php练习4——排序,查找
    php练习3——猜拳游戏,评委打分问题
    php练习2——乘法表,变量的使用
    php练习1——计算器
    php函数的初步使用
    php练习——打印半金字塔、金字塔、空心金字塔、菱形、空心菱形
    Discuz论坛下载与安装
    phpMyAdmin下载与安装
    mysql5.7下载与安装,php5.6与mysql5.7整合
    php5下载,apache2.4与php5整合
  • 原文地址:https://www.cnblogs.com/21heshang/p/6209178.html
Copyright © 2011-2022 走看看