From 11e1eb5119e423c9664bb63bbe881b1561a71c50 Mon Sep 17 00:00:00 2001 From: shuzheng <469741414@qq.com> Date: Mon, 6 Feb 2017 23:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E6=8C=87?= =?UTF-8?q?=E5=AE=9Akey=E7=9A=84cookie=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/zheng/common/util/CookieUtil.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zheng-common/src/main/java/com/zheng/common/util/CookieUtil.java b/zheng-common/src/main/java/com/zheng/common/util/CookieUtil.java index 3cd90a6e..a6ca9779 100644 --- a/zheng-common/src/main/java/com/zheng/common/util/CookieUtil.java +++ b/zheng-common/src/main/java/com/zheng/common/util/CookieUtil.java @@ -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); + } + }