• 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)

  • 相关阅读:
    查看另外一台服务器的版本号
    制作数据集(二)
    制作数据集(一)
    中文分词工具包 PKUSeg
    Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend)
    修改主机名
    例题
    Oracle基本使用
    Linux里面的MySQL忘记密码RROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    SpringBoot2.x以上配置schema.sql脚本
  • 原文地址:https://www.cnblogs.com/21heshang/p/6209178.html
Copyright © 2020-2023  润新知