Spring boot configure custom jsessionid for embedded server

后端 未结 4 1555
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 20:04

I want to configure my servlet context, such as setting a custom jsessionId key (see Changing cookie JSESSIONID name)

I believe I can use the SpringBootServlet

4条回答
  •  长情又很酷
    2020-12-13 20:14

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
        .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.NEVER).and()
        .csrf().disable();  
    }
    

    You can try this as it removes jsession id from URL

提交回复
热议问题