【java】swagger校验RequestParam参数不能为空

@Validated
public class TestController{
	@GetMapping("/test")
	@ApiImplicitParams({
		@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataType = "string", required = true),
	})
	@ApiOperation(value = "名称", notes = "名称")
	public R checkTemplateName(@RequestParam(value="name", required = true) @NotBlank(message="name不能为空") String name, ) throws AuthenticationException {
		
	}

你可能感兴趣的:(java,java)