Spring,@Controller,@RequestMapping, @ResponseBody,@RequestParam

学向勤中得,萤窗万卷书。这篇文章主要讲述Spring,@Controller,@RequestMapping, @ResponseBody,@RequestParam相关的知识,希望能为你提供帮助。
1.@Controller,放在类的上方,使类生效;
2.@RequestMapping,

Spring,@Controller,@RequestMapping, @ResponseBody,@RequestParam

文章图片
,指定一个映射,method为访问方式,headers为含有指定请求头
3.
@ResponseBody将返回的信息放入响应头中,
4.@RequestParam,属性有

Spring,@Controller,@RequestMapping, @ResponseBody,@RequestParam

文章图片

 
value:指定别名,required:是否必填,默认为true,defalutValue:默认值



【Spring,@Controller,@RequestMapping, @ResponseBody,@RequestParam】 

    推荐阅读