Skip to content

Commit

Permalink
fix annotation processing TypeNotPresentExceptionProxy bug (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
alaneuler authored Jun 4, 2021
1 parent 26852ca commit 3c837db
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.springframework.context.annotation.ScannedGenericBeanDefinition;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.Environment;
import org.springframework.core.type.MethodMetadata;
Expand Down Expand Up @@ -259,7 +260,9 @@ private void doGenerateSofaReferenceDefinition(BeanDefinition beanDefinition,
private void generateSofaServiceDefinitionOnClass(String beanId, Class<?> beanClass,
BeanDefinition beanDefinition,
ConfigurableListableBeanFactory beanFactory) {
SofaService sofaServiceAnnotation = beanClass.getAnnotation(SofaService.class);
// See issue: https://github.com/sofastack/sofa-boot/issues/835
SofaService sofaServiceAnnotation = AnnotationUtils.findAnnotation(beanClass,
SofaService.class);
generateSofaServiceDefinition(beanId, sofaServiceAnnotation, beanClass, beanDefinition,
beanFactory);
}
Expand Down

0 comments on commit 3c837db

Please sign in to comment.