◎筱米加步枪◎.Blog

Happy coding

出现Unable to find Bean with name XXX 可能原因

筱米加步枪 posted @ 2010年7月08日 06:36 in [ 开源框架 ] with tags spring , 2405 阅读

今天在公司做项目中,

由Ctrl层 >>> Biz层>>> Dao层 。在Ctrl注入Biz层类 ,在Biz层类注入Dao层类,使用注解的方式进行注入,例如,在Biz层注入Dao层的时候,首先需要将Dao层暴露出来,也就是将这个类标上 @Repository等注解,不然可能会出现Unable to find Bean with name的错误。原理实际上就是定义了一个Bean,没有定义的Bean使用注入自然是找不到这个Bean对象咯~~

换句话说若出现:Unable to find Bean with name 这种错误,不妨看看被注入类是否暴露给其他类咯~~也许是这个问题~

Karnataka 8th Quest 说:
2023年7月24日 00:44

Karnataka 8th Important Model Paper 2024 Should be a part of Regular Preparation Strategies Adopted by Every Students to score better marks in the High School Final Exam 2024, Karnataka Karnataka 8th Question Paper 2024 Exam Previous Question Paper 2024 In a move to improve the Logical and Analytical Skills of 8th Students, Karnataka Model Paper 2024 It will help Them to be more Confident while Facing the Exam 2024.Here we have Provided the Complete Information about the Karnataka Sample Paper 2024 for All the desired aspirants. You can also visit This website for more Details of Karnataka Blueprint 2024 Latest Updates.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter