比如以下数据库映射:
@Entity
@Table(name = "user")
@Data
public class Data{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Integer id;
@Column(name = "_and")
private String And;
}
public interface DataRepository extends JpaRepository<Data, Integer>, JpaSpecificationExecutor<Data> {
Data findDataByAnd(String and);
}