This commit is contained in:
2020-04-16 01:53:25 +08:00
parent b1ded445bf
commit a05953ec75
4 changed files with 82 additions and 26 deletions

View File

@@ -0,0 +1,15 @@
package com.yutou.tools.utils;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
public class Tools {
public static Cookie getCookie(HttpServletRequest request,String key){
for (Cookie cookie : request.getCookies()) {
if(cookie.getName().equals(key)){
return cookie;
}
}
return null;
}
}