问题记录---SpringBoot访问接口Tomcat提示A cookie header was received[xxxx] that contained an invalid cookie...
环境: JDK 1.8SpringBoot Version :2.3.5.RELEASE问题描述:在访问编写的接口时,Tomcat提示:A cookie header was received[xxxxxx] that contained an invalid cookie. That cookie will be ignore解决方法:@Beanpublic WebServerFactoryCu
·
环境: JDK 1.8
SpringBoot Version : 2.3.5.RELEASE
问题描述:
在访问编写的接口时,Tomcat提示: A cookie header was received[xxxxxx] that contained an invalid cookie. That cookie will be ignore
解决方法:
@Bean
public WebServerFactoryCustomizer<TomcatServletWebServerFactory> cookieProcessorCustomizer() {
return tomcatServletWebServerFactory -> tomcatServletWebServerFactory.addContextCustomizers((TomcatContextCustomizer) context -> {
context.setCookieProcessor(new LegacyCookieProcessor());
});
}
注入上面的Bean可解决!!!
更多推荐
已为社区贡献1条内容
所有评论(0)