package com.nantian.sc.cloud.common.security.annotation;

import com.nantian.sc.cloud.common.security.component.ScResourceServerAutoConfiguration;
import com.nantian.sc.cloud.common.security.component.ScSecurityBeanDefinitionRegistrar;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.*;

/**
 *
 * @date 2018/11/10
 * <p>
 * 资源服务注解
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({ScResourceServerAutoConfiguration.class, ScSecurityBeanDefinitionRegistrar.class})
public @interface EnableScResourceServer {

}
