SpringDataJPA
又再写bug
谁会愿意做个野指针
展开
-
SpringDataJPA中Repository的子接口
1.CrudRepository子接口 (1).EmployeeDao接口类: import org.springframework.data.repository.CrudRepository; import com.kmu.entity.Employee; public interface EmployeeDao extends CrudRepository<Employee, Int...原创 2020-04-27 16:32:49 · 383 阅读 · 0 评论 -
SpringDataJPA中的JPQL
SpringDataJPA中的JPQL 示例: 注:jpql查询不需要事务的支持,但增删改需要事务的支持 1.Employee实体类: @Entity public class Employee { private Integer empId; private String empAddress; private Integer empAge; private String empGend...原创 2020-04-23 16:27:56 · 163 阅读 · 0 评论 -
SpringDataJPA方法命名规范
SpringDataJPA配置及其方法命名规范 示例: 1.Employee实体类: @Entity public class Employee { private Integer empId; private String empAddress; private Integer empAge; private String empGender; private String em...原创 2020-04-21 13:49:19 · 938 阅读 · 0 评论