package vip.xiaonuo.biz.core.sign.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.stereotype.Component;

/**
 * @Author 徐超
 * @Date 2021/4/20 16:15
 * @Version 1.0
 */
@Component
@Data
@ConfigurationProperties(prefix = "open-sign.interceptor")
public class OpenSignInterceptorProperties {

    /**
     * 签名拦截器
     */
    @NestedConfigurationProperty
    private InterceptorConfig sign = new InterceptorConfig();


    /**
     * 自定义权限拦截器
     */
    @NestedConfigurationProperty
    private InterceptorConfig permission = new InterceptorConfig();


    // 内部类
    @Data
    public static class InterceptorConfig {

        /**
         * 是否启用
         */
        private boolean enable;

        /**
         * 包含的路径
         */
        private String[] includePaths = new String[]{};

        /**
         * 排除路径
         */
        private String[] excludePaths = new String[]{};


    }


}
