美文网首页
【转】Spring Boot 2.0.2 使用 hibernat

【转】Spring Boot 2.0.2 使用 hibernat

作者: IT晴天 | 来源:发表于2019-03-29 15:47 被阅读0次

把一个旧项目的mybatis-plus从2.x升级到3.x,发现hibernate validator提示【已过时】了,平时还没注意这个,强迫症还是把它处理了,小记一下:
把下面的

import org.hibernate.validator.constraints.NotBlank;   // 已经过时了

替换为

import javax.validation.constraints.NotBlank;

说明:spring-boot 2.x中,spring-boot-starter-web jar 集成了hibernate-validator,故改为使用这个包名;

资料来源于:https://blog.csdn.net/u013107634/article/details/80639412

至于hibernate validator的使用说明,可以看看此文,其中使用注意:
http://www.leftso.com/blog/328.html

相关文章

网友评论

      本文标题:【转】Spring Boot 2.0.2 使用 hibernat

      本文链接:https://www.haomeiwen.com/subject/qlnlbqtx.html