All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nutz.boot.starter.sentinel.annotation.SentinelAnnotationAop Maven / Gradle / Ivy

There is a newer version: 2.5.1.v20220215
Show newest version
package org.nutz.boot.starter.sentinel.annotation;

import java.lang.reflect.Method;
import java.util.List;

import org.nutz.aop.MethodInterceptor;
import org.nutz.ioc.Ioc;
import org.nutz.ioc.aop.SimpleAopMaker;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;

import com.alibaba.csp.sentinel.annotation.SentinelResource;

@IocBean(name="$aop_sentinel_resource")
public class SentinelAnnotationAop extends SimpleAopMaker {

    public List makeIt(SentinelResource t, Method method, Ioc ioc) {
        return Lang.list(new SentinelMethodInterceptor(t, method, ioc));
    }

    public String[] getName() {
        return new String[0];
    }

    public boolean has(String name) {
        return false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy