用来接收浏览发送过来的 Cookie 值

SpringMVC-@CookieValue注解

/**
 * @author: BNTang
 */
@Controller
public class MyFirstController {

    @RequestMapping("testHeader")
    public String show(@CookieValue("JSESSIONID") String sessionId) {
        System.out.println(sessionId);
        return "/first";
    }
}

相关文章:

  • 2021-11-01
  • 2021-07-02
  • 2021-08-04
  • 2021-08-25
  • 2021-05-26
  • 2021-06-30
  • 2021-07-01
  • 2021-11-21
猜你喜欢
  • 2021-07-18
  • 2022-12-23
  • 2021-08-10
  • 2021-09-12
  • 2022-02-26
  • 2022-12-23
相关资源
相似解决方案