javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie("id",session.getId());
	 cookie.setPath("/");
	 cookie.setDomain(".kuangke.com");
	 cookie.setMaxAge(-1);
	 response.addCookie(cookie);
				    

如果存在注解@ResponseBody 则写不到前端页面,具体原因不详。。。 

 cookie.setMaxAge(-1)有效期就是后端设置cookie写不到前端页面

相关文章:

  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2021-12-17
  • 2021-12-07
猜你喜欢
  • 2021-07-14
  • 2022-12-23
  • 2021-12-27
  • 2022-02-23
  • 2021-12-20
  • 2022-12-23
  • 2021-12-04
相关资源
相似解决方案