|
|
@ -2,7 +2,6 @@ package ${domain}.frame.utils;
|
|
|
|
|
|
|
|
|
|
|
|
import ${domain}.frame.auth.LocalData;
|
|
|
|
import ${domain}.frame.auth.LocalData;
|
|
|
|
import javax.servlet.http.Cookie;
|
|
|
|
import javax.servlet.http.Cookie;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -42,7 +41,6 @@ public class CookieUtil {
|
|
|
|
* @param value 值
|
|
|
|
* @param value 值
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static Cookie newCookie(String name, String value) {
|
|
|
|
public static Cookie newCookie(String name, String value) {
|
|
|
|
HttpServletRequest request = LocalData.getRequest();
|
|
|
|
|
|
|
|
Cookie cookie = new Cookie(name, value);
|
|
|
|
Cookie cookie = new Cookie(name, value);
|
|
|
|
cookie.setMaxAge(-1);
|
|
|
|
cookie.setMaxAge(-1);
|
|
|
|
cookie.setPath("/");
|
|
|
|
cookie.setPath("/");
|
|
|
@ -55,7 +53,6 @@ public class CookieUtil {
|
|
|
|
* @param name 键
|
|
|
|
* @param name 键
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static void clearCookie(String name) {
|
|
|
|
public static void clearCookie(String name) {
|
|
|
|
HttpServletRequest request = LocalData.getRequest();
|
|
|
|
|
|
|
|
HttpServletResponse response = LocalData.getResponse();
|
|
|
|
HttpServletResponse response = LocalData.getResponse();
|
|
|
|
Cookie cookie = new Cookie(name, null);
|
|
|
|
Cookie cookie = new Cookie(name, null);
|
|
|
|
cookie.setMaxAge(0);
|
|
|
|
cookie.setMaxAge(0);
|
|
|
|