一. 概述
Spring Data JPA, part of the larger Spring Data family, makes it easy to easily implement JPA based repositories. This module deals with enhanced support for JPA based data access layers. It makes it easier to build Spring-powered applications that use data access technologies.
二. 基本操作
fineOne(id) 根据id查询一个实体类
save(jopo)新增或者更新 根据是否有id
delete
fingAll 查询所有
三. 运行过程与原理剖析
第一步:Spring data JPA
1. 通过JdkDynamicAopProxy类中的invoke方法创建动态代理对象
2. 动态代理对象: SimpleJpaRepository,实现了JpaRepository,JpaSpecificationExecutor接口,对基本的JPA操作进行了封装
3. 数据库操作(save,delete等)