首页 > 移动平台 > 详细

Spring里的applicationContext.getBeansWithAnnotation

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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!