摘要: 使用Hibernate Validator进行数据校验 Bean Validation注解(需要加入相关依赖,在SpringBoot中可以直接使用,SpringBoot会帮我们直接加入) @Null 验证对象是否为空(属性必须为空,客户不能传入此属性,否则会报错) @NotNull 验证对象是否为非 阅读全文
posted @ 2018-10-02 23:38 一飞要上天 阅读(1579) 评论(0) 推荐(0) 编辑