顯示具有 Session 標籤的文章。 顯示所有文章
顯示具有 Session 標籤的文章。 顯示所有文章

2021年3月2日 星期二

disable-url-rewriting =“true

https://www.cnblogs.com/xjknight/p/10897849.html

从Spring 3.0开始,现在可以通过在命名空间中设置disable-url-rewriting =“true”来禁用将jsessionid附加到URL的URL重写逻辑。

web.xml方式設定:
<session-config>
     <tracking-mode>COOKIE</tracking-mode>
</session-config>

Java config方式設定:
servletContext.setSessionTrackingModes(EnumSet.of(SessionTrackingMode.COOKIE));