spring加载bean报错:expected at least 1 bean which qualifies as autowire candidate. Dependency annotation...

博客主要讲述了在Spring框架中遇到的启动报错问题,报错信息提示期望至少1个符合条件的自动装配候选Bean。通过分析错误日志,发现是由于某个类存在带参数的构造器,但在Spring的XML配置文件中未提供对应的构造器参数配置。修复方案是将该类的构造器改为无参数构造器,从而解决了启动问题。
摘要由CSDN通过智能技术生成

  看具体报错日志:

警告: Unable to proxy interface-implementing method [public final void wlf.hello.proto.Linkservice._HelloService$HelloService.callMethod
(com.google.protobuf.Descriptors$MethodDescriptor,com.google.protobuf.RpcController,com.google.protobuf.Message,com.google.protobuf.RpcCallback)]
because it is marked as final:
Consider using interface-based JDK proxies instead! 八月 24, 2018 5:29:22 下午 org.springframework.aop.framework.CglibAopProxy doValidateClass 信息: Final method [public final void wlf.hello.proto.Linkservice._HelloService$HelloService.callMethod(com.google.protobuf.Descriptors$MethodDescriptor,com.google.protobuf.RpcController,com.google.protobuf.Message,com.google.protobuf.RpcCallback)]
cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance. 八月 24, 2018 5:29:23 下午 org.springframework.web.context.support.XmlWebApplicationContext refresh 警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'getHelloActionImpl' defined in class path resource [wlfservice.xml]:
Unsatisfied dependency expressed through constructor parameter 0; nested exc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值