How can the WebFilter filter annotations in Java's springboot2.0 be elegantly set not to intercept certain requests?

Baidu says it can be judged manually by req.getURI, but I don"t want to. I don"t think it"s elegant.

Configuration
@WebFilter(filterName = "myFilter", urlPatterns = "/*")
public class MyFilter implements Filter {
    @Override
    public void init(FilterConfig arg0) throws ServletException {
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        HttpServletRequest req = (HttpServletRequest) request;

        String cookieToken =CookieUtils.getCookie(req,"token");

        String headerToken = req.getHeader("token");
        if (TokenUtils.notCorrect(headerToken)){
            return;
        }
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {
    }
}

  https://blog.csdn.net/fritzji.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b379bf-34474.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b379bf-34474.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?