添加忽略拦截注解
@Target({ElementType.TYPE,ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface AuthIgnore { }
/** * 在放行的类或者方法上加上 @AuthIgnore 注解 */ @RestController @RequestMapping("/adapter") @Api(value = "自动生成接口controller", tags = {"自动生成接口"}) public class AdapterController { @AuthIgnore Object myTest() { return "恭喜调用成功"; } }
getaway 配置放行路径
标签:AuthIgnore,接口,springsecurity,注解,拦截,ElementType From: https://www.cnblogs.com/tuxiaoer/p/17100905.html