增加删除指定key的cookie方法

This commit is contained in:
shuzheng 2017-02-06 23:45:02 +08:00
parent 5d1271c4e8
commit 11e1eb5119
1 changed files with 10 additions and 0 deletions

View File

@ -52,4 +52,14 @@ public class CookieUtil {
return value;
}
/**
* 删除cookie
* @param response
* @param name
* @return
*/
public static void removeCookie(HttpServletResponse response, String name) {
setCookie(response, name, "", "/", 0);
}
}