Spring閲岀殑applicationContext.getBeansWithAnnotation

青春须早为,岂能长少年。这篇文章主要讲述Spring閲岀殑applicationContext.getBeansWithAnnotation相关的知识,希望能为你提供帮助。
鏍囩锛?a href='http://www.mamicode.com/so/1/ati' title='ati'>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.
【Spring閲岀殑applicationContext.getBeansWithAnnotation】
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

    推荐阅读