alibaba / spring-context-support

An internal support project for spring-context in Alibaba
Apache License 2.0
150 stars 83 forks source link

Fix version compatibility issues #44

Closed wuwen5 closed 2 years ago

wuwen5 commented 3 years ago

The default value should be false to keep compatibility with the previous version.

image

https://github.com/apache/dubbo/issues/7274

wuwen5 commented 3 years ago

@mercyblitz

wuwen5 commented 3 years ago
/**
* Retrieve the given annotation's attributes as an {@link AnnotationAttributes} map.
* <p>Equivalent to calling {@link #getAnnotationAttributes(AnnotatedElement, Annotation, boolean, boolean)}
* with the {@code classValuesAsString} and {@code nestedAnnotationsAsMap} parameters
* set to {@code false}.
* @param annotatedElement the element that is annotated with the supplied annotation;
* may be {@code null} if unknown
* @param annotation the annotation to retrieve the attributes for
* @return the annotation attributes (a specialized Map) with attribute names as keys
* and corresponding attribute values as values (never {@code null})
* @since 4.2
* @see #getAnnotationAttributes(AnnotatedElement, Annotation, boolean, boolean)
*/
public static AnnotationAttributes getAnnotationAttributes(
    @Nullable AnnotatedElement annotatedElement, Annotation annotation) {

    return getAnnotationAttributes(annotatedElement, annotation, false, false);
}
wuwen5 commented 2 years ago

https://github.com/nacos-group/nacos-spring-project/issues/258