拋出異常:html
java.lang.IllegalArgumentException: An invalid domain [.test.com] was specified for this cookiejava
參考博客:apache
https://www.cnblogs.com/cmlblog/p/7663111.htmltomcat
解決方法cookie
一、設置爲一級域名 test.com 前面不加 .dom
二、tomcat的CookieProcessor降級 使用LegacyCookieProcessor 而非Rfc6265CookieProcessorpost
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />this