@Override
public Object postProcessAfterInitialization(final Object bean, String beanName) throws BeansException {
final Class<?> beanType = bean.getClass();
RepositoryEventHandler typeAnno = AnnotationUtils.findAnnotation(beanType, RepositoryEventHandler.class);
if (null == typeAnno) {
return bean;
}
Class<?>[] targetTypes = typeAnno.value();
if (targetTypes.length == 0) {
targetTypes = new Class<?>[] { null };
}
for (final Class<?> targetType : targetTypes) {