springMVC笔记系列(10)——CookieValue注解
这几篇文章都在讲注解,文章结构都有点八股文了。我不想啰嗦了,直接上代码吧。这次是映射cookie的注解,过场叙述请读者自己脑补。 package com.happyBKs.springmvc.handlers; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @RequestMapping("class") @Controller public class RPTestHandler { String page="successrm"; @RequestMapping("testCookie") public String handleCookieValue(@CookieValue(value="JSESSIONID") String