maven 依赖
< parent>
< groupId> org.springframework.boot</ groupId>
< artifactId> spring-boot-starter-parent</ artifactId>
< version> 2.0.4.RELEASE</ version>
< relativePath> </ relativePath>
</ parent>
......
使用JpaRepository和JpaSpecificationExecutor提供的接口方法
实体类
@Entity
@Table ( name = "sensitive" )
@ApiModel ( value = "词汇信息" )
public class Sensitive {
@Id
@GeneratedValue ( strategy = GenerationType. IDENTITY)
@javax . persistence. Column ( name = "id" , nullable = false , unique = true )
private Long id;
@NotNull
@javax . persistence. Column ( name = "type" , nullable = false )
private String type;
@NotNull
@javax . persistence. Column ( name = "word" , nullable = false )
private String word;
@javax . persistence. Column ( name = "adduserid" , nullable = false )
private Long adduserid;
@javax . persistence. Column ( name = "addusername" , nullable = false )
private String addusername;
@javax . persistence. Column ( name = "addtime"