org.springframework.beans.factory.BeanCreationException: Error creating bean with name

这篇具有很好参考价值的文章主要介绍了org.springframework.beans.factory.BeanCreationException: Error creating bean with name。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

异常日志:[WARNING] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.MappedInterceptor#0': Cannot create inner bean '(inner bean)#334bdaef' of type [org.springframework.web.servlet.handler

解决方法:
属于bean注入问题,首先定位到LightShopDecorationService,然后检查接口是否添加@Service,且相应的接口有没有单独声明,上述问题是接口没有进行@HSFConsumer注册,添加后正常

原因分析:
此异常为: bean注入异常,没有得到bean对象。

而且转换器对象都必须实现转换器、转换器工厂或泛型转换器接口之一
能够导致 bean 注入失败的原因包括:
1、对应的 bean 没有添加注解、添加错误,或者选择错误的自动注入方法;
2、项目整合的时候jar包引用出错

解决方法

后来发现是没有实现接口,把接口实现,然后重写方法就可

注意:要核对springmvc.xml和web.xml文件是否也存在问题,这一点很重要。

这是我在修改过程中的见解,希望对大家有帮助
————————————————文章来源地址https://www.toymoban.com/news/detail-431116.html

到了这里,关于org.springframework.beans.factory.BeanCreationException: Error creating bean with name的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 报错org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name...

    刚学SpringBoot,今天启动的时候报错了,长长的一堆报错信息 报错信息大概说的是创建UserController bean出现错误 下面又说创建UserService bean出现错误和UserMapper也出错 于是我百度了一下,都说没加注解,我检查了一下,改加的都加了呀 于是我又分别测试了一下mapper和service 又说报

    2024年02月04日
    浏览(48)
  • 报错:Caused by org.springframework.beans.factory.BeanCreationException

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’ defined in class path resource [spring/spring-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type ‘java.lang.String’ to

    2024年02月13日
    浏览(36)
  • Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit

    是因为没有扫描到 mapper,在启动类或者配置类中@MapperScan配置包扫描,或者使用@Mapper注解Mapper接口

    2024年02月16日
    浏览(37)
  • Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyExc

    Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name ‘org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration’: Unsatisfied dependency expressed through field ‘filterMap’; nested exception is org.springframework.beans.factory.BeanCreatio

    2024年02月07日
    浏览(29)
  • 已解决org.springframework.beans.factory.UnsatisfiedDependencyException org.springframework.beans.factor

    已解决org.springframework.beans.factory.UnsatisfiedDependencyException org.springframework.beans.factory.异常的正确解决方法,亲测有效!!! org.springframework.beans.factory.UnsatisfiedDependencyException org.springframework.beans.factor 对于 org.springframework.beans.factory.UnsatisfiedDependencyException 异常,通常是由于依赖注

    2024年02月05日
    浏览(37)
  • 关于org.springframework.beans.factory.NoSuchBeanDefinitionException

    这个报错可能是因为: 1. spring的xml配置文件Bean中的id和getBean的id不一致 spring的配置文件中: 而程序中 applicationContext.getBean(“studenta”, Student.class)中的是studenta而spring配置文件的id是student,不一致。 2. 是否是忘记加注解了 @Resource或@Autowired都可以(@Resource是jdk自带的) 3.如果

    2024年02月13日
    浏览(51)
  • exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException

    原因: Spring Boot异常org.springframework.beans.factory.NoUniqueBeanDefinitionException:没有可用的合格Bean类型:预期匹配单个Bean,但是匹配到了多个,当该bean被自动装配时与Spring Boot应用程序上下文中的两个或多个加载的Bean匹配时,就会发现该异常。 Spring Boot允许从一个接口或抽象类创

    2024年02月09日
    浏览(28)
  • Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException

    修改为:    解决办法: BookDao层中添加@Mapper, 告诉springboot这是一个mybatis代理接口类型, 快来扫描我!, 由此生成代理对象 原因三:   测试类ModuleSetApplicationTests和引导程序ModuleSetApplication没有在同名包下, 例如下图, ModuleSetApplication类在com.itheima下ModuleSetApplicationTests没有直接在com

    2024年02月11日
    浏览(36)
  • springboot与springcloud版本关系,BeanCreationException: Error creating bean with name

    添加注解@EnableFeignClients后报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name \\\'configurationPropertiesBeans\\\' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is

    2024年02月05日
    浏览(30)
  • 已解决Application run failed org.springframework.beans.factory.BeanNot

    问题原因:SpringBoot的版本与mybiats-puls版本不对应且,spring自带的mybiats与mybiats-puls版本不对应 这里我用的是3.2.2版本的SpringBoot,之前mybiats-puls版本是3.5.3.1有所不同。 问题:版本对不上 解决办法:完整粘贴就好

    2024年02月21日
    浏览(33)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包