【发布时间】:2020-05-26 00:18:17
【问题描述】:
我正在使用 WebFlux 创建一个响应式 Spring Boot 项目。我需要配置会话cookie名称和路径。
在基于 Tomcat 的项目中,configure the session cookie using the configuration 文件很容易:
server.servlet.session.cookie.name = MYSESSIONID
server.servlet.session.cookie.path = /
如果我在 WebFlux 项目中配置这些属性,它不会影响 cookie 参数。该怎么做?
【问题讨论】:
-
正如您在属性中看到的,它说“servlet”webflux 不使用 servlet。
-
没错,这正是我要问的原因。 WebFlux 中的等效配置是什么。
-
没有,webflux用的是netty,你得在netty里查一下怎么弄,我答不上来
标签: spring spring-boot session-cookies spring-webflux reactive