java.lang.IllegalArgumentException: An invalid domain [.hhh.com] was specified for this cookie

Cookie cookie = new Cookie("1", "ddddd");
cookie.setMaxAge(60*60);
cookie.setHttpOnly(true);
cookie.setPath("/");
cookie.setDomain(".hhh.com");
response.addCookie(cookie);
return getDataResponse(cookie);

改成 cookie.setDomain(“hhh.com”);

你可能感兴趣的:(java,python,前端)