public class SpringUtil extends Object
| 构造器和说明 |
|---|
SpringUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
getAnnotationValue(Annotation annotation,
String key,
Class<T> parse)
获取注解的值
|
static Annotation |
getAssignableFromAnnotation(Annotation source,
Class target)
获取包含的另外一个注解
|
static org.springframework.web.bind.annotation.RequestMethod |
getRequestMethod(Method method)
获取请求方式
请求方式 0-全部 1-get 2-post 3-put 4-delete
|
static String |
getRequestPath(Annotation[] annotations) |
static String |
getRequestPath(Class clazz) |
static String |
getRequestPath(Method method) |
static boolean |
isAssignableFromAnnotation(Annotation source,
Class target)
判断一个注解是否包含另外一个注解
|
public static String getRequestPath(Annotation[] annotations)
public static <T> T getAnnotationValue(Annotation annotation, String key, Class<T> parse)
annotation - 注解key - 注解属性(属性方法名)parse - 需要转换的类型public static Annotation getAssignableFromAnnotation(Annotation source, Class target)
source - 源注解target - 判断是否包含的注解public static boolean isAssignableFromAnnotation(Annotation source, Class target)
source - 源注解target - 判断是否包含的注解public static org.springframework.web.bind.annotation.RequestMethod getRequestMethod(Method method)
method - 类RequestMethodCopyright © 2021. All rights reserved.