package cn.cslg.pas.common.core.annotation;

import org.springframework.context.annotation.Configuration;

import java.lang.reflect.Method;

@Configuration
public class AnnotationParse {

    public static int[] permissionParse(Method method) throws Exception {
        if(method.isAnnotationPresent(Permission.class)){
            Permission annotation = method.getAnnotation(Permission.class);
            return annotation.roles();
        }
        return null;
    }
}
