top.cutexingluo.tools.utils.spring.ImportSelectorUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xingtools-extra Show documentation
Show all versions of xingtools-extra Show documentation
xingtools 依赖core,附加,也就是基于 SpringBoot 的一些工具或实体类
The newest version!
package top.cutexingluo.tools.utils.spring;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotationMetadata;
import java.util.Map;
/**
* @author XingTian
* @version 1.0.0
* @date 2024/7/16 12:25
*/
public class ImportSelectorUtil {
/**
* 获取 AnnotationAttributes 对象
*/
public static AnnotationAttributes getAnnotationAttributes(AnnotationMetadata importingClassMetadata,Class annoType ){
Map annotationAttributes = importingClassMetadata
.getAnnotationAttributes(annoType.getName(), false);
return annotationAttributes != null ?
AnnotationAttributes.fromMap(annotationAttributes):null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy