public static void removeCookie(HttpServletResponse response, String name,String domain) {
        if (StringUtils.isNotEmpty(name)) {
            Cookie cookie = new Cookie(name, null);
            cookie.setMaxAge(0);
            if(StringUtils.isNotEmpty(domain)){
                cookie.setDomain(domain);
            }
            cookie.setPath("/");
            response.addCookie(cookie);
        }
    }