如果要添加接口校验,需要1,在接口方法中请求参数前面添加@Valid注解,不需要在接口的实现类上添加@Valid注解,也不需要@Validated注解:addAnimal(@Valid Animal a)2 ...
確定! 回上一頁