Open egzosn opened 6 years ago
在参数没有加上@Valid的时候是这样的
/**
* @author egan
* @email egzosn@gmail.com
* @date 2018/2/8
*/
@RequestMapping("swg")
@RestController
public class SwgTest extends BaseController{
@ApiOperation(value = "测试Swg")
@RequestMapping(value = "test", method = RequestMethod.POST)
public Map<String, Object> test( SwgBean body){
return successData();
}
}
然后加上之后变成这样了
/**
* @author egan
* @email egzosn@gmail.com
* @date 2018/2/8
*/
@RequestMapping("swg")
@RestController
public class SwgTest extends BaseController{
@ApiOperation(value = "测试Swg")
@RequestMapping(value = "test", method = RequestMethod.POST)
public Map<String, Object> test(@Valid SwgBean body){
return successData();
}
}
试一下:@RequestParam @Valid SwgBean body
不好意思,没有get到问题点。。。