Commit 793ae1f7 authored by WeiWei's avatar WeiWei

更换Cookie解析器

parent ae1d7f45
......@@ -67,7 +67,7 @@ public class LogService {
session.setAttribute(ApplicationDictionary.PRINCIPAL, JSONTools.serialize(principal));
Cookie cookie = new Cookie("JSESSIONID", session.getId());
cookie.setDomain(".vinceruan.info");
cookie.setDomain("*");
cookie.setPath("/");
this.response.addCookie(cookie);
......
package cn.quantgroup.cashloanflowboss.core.configuration;
import org.apache.tomcat.util.http.LegacyCookieProcessor;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Created by WeiWei on 2019/8/21.
*/
@Configuration
public class TomcatConfiguration {
@Bean
public EmbeddedServletContainerCustomizer cookieProcessorCustomizer() {
return container -> {
if (container instanceof TomcatEmbeddedServletContainerFactory) {
((TomcatEmbeddedServletContainerFactory) container)
.addContextCustomizers((TomcatContextCustomizer) context -> context.setCookieProcessor(new LegacyCookieProcessor()));
}
};
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment