Spring里的applicationContext.getBeansWithAnnotation
时间:2018-12-05 17:00:23
收藏:0
阅读:2477
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
原文:https://www.cnblogs.com/yuyu666/p/10071829.html
评论(0)