remove jsessionid in url rewrite in spring mvc

前端 未结 5 1502
深忆病人
深忆病人 2021-01-31 19:20

I am using spring MVC and having a problem in jsessionid, what I found is that jsessionid is injected in the url if cookies isn\'t enabled in the browser producing a url like th

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-31 20:00

    If you don't use Spring http tag.
    Go to your applicationFilterChain bean that defines your Spring filter chains.
    Normally you will have a filter called httpSessionContextIntegrationFilter or something very close, that is based of the class org.springframework.security.web.context.HttpSessionContextIntegrationFilter or inherits from it.
    Add the property:

    
    

    And add the bean:

    
        
    
    


    This should be equivalent to setting disable-url-rewriting to true

提交回复
热议问题