加入配置:
sso.cookie.name=JSESSIONID
sso.cookie.path=/
sso.cookie.maxage=-1
sso.cookie.domain=XXX.com
配置Cooke domain 和 名称:
domainNamePattern 的使用,受制很多条件,此处的源码如下:
private String getDomainName(HttpServletRequest request) {if (this.domainName != null) {return this.domainName;}if (this.domainNamePattern != null) {Matcher matcher = this.domainNamePattern.matcher(request.getServerName());if (matcher.matches()) {return matcher.group(1);}}return null;}
request.getServerName() 能否正确的获取当前使用的域名,可能和反向代理服务器的配置有关,请谨慎使用。
Spring session 配置如下:
上一篇:ble mesh相关词汇