码迷,mamicode.com
首页 > 移动开发 > 详细

Spring里的applicationContext.getBeansWithAnnotation

时间:2018-12-05 17:25:00      阅读:955      评论:0      收藏:0      [点我收藏+]

标签:ati   The   nta   object   exce   row   created   context   could   

getBeansWithAnnotation


Map<String,Object> getBeansWithAnnotation(Class<? extends Annotation> annotationType)
throws BeansException


Find all beans whose Class has the supplied Annotation type.


Parameters:
annotationType - the type of annotation to look for
Returns:
a Map with the matching beans, containing the bean names as keys and the corresponding bean instances as values
Throws:
BeansException - if a bean could not be created

Spring里的applicationContext.getBeansWithAnnotation

标签:ati   The   nta   object   exce   row   created   context   could   

原文地址:https://www.cnblogs.com/yuyu666/p/10071829.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!