publish 2.0.0.rc6

This commit is contained in:
曾文豪
2024-07-12 11:16:46 +08:00
parent e709050ba3
commit 6332d1486b

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.tiesheng.annotation.token.TokenIgnore;
import com.tiesheng.util.config.TsTokenConfig;
import com.tiesheng.util.pojos.TokenBean;
import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.MethodParameter;
import org.springframework.web.bind.support.WebDataBinderFactory;
@@ -82,6 +83,10 @@ public class TokenWebMvcConfigurer implements WebMvcConfigurer {
// 过滤不要需要验证的接口(注解)
HandlerMethod handlerMethod = (HandlerMethod) handler;
if (handlerMethod.getBeanType() == BasicErrorController.class) {
return true;
}
TokenIgnore annotation = handlerMethod.getBeanType().getAnnotation(TokenIgnore.class);
if (annotation != null) {
return true;