1、实体映射
实体类 <--> 数据表
@GeneratedValue:主键生成方式为自增,Hibernate自动生成HIBERNATE_SEQUENCE
的序列
2、validation
@Service @Validated public class MyBean { public Archive findByCodeAndAuthor(@Size(min = 8, max = 10) String code, Author author) { ... } }
实体类 <--> 数据表
@GeneratedValue:主键生成方式为自增,Hibernate自动生成HIBERNATE_SEQUENCE
的序列
@Service @Validated public class MyBean { public Archive findByCodeAndAuthor(@Size(min = 8, max = 10) String code, Author author) { ... } }
本文标题:Day10:
本文链接:https://www.haomeiwen.com/subject/secdkxtx.html
网友评论