
上QQ阅读APP看书,第一时间看更新
2.1 Spring Data框架概述
Spring Data是一个能简化数据库访问的开源框架,通过该框架里的ORM特性,我们能比较快捷地编写对数据库层的访问逻辑。由于它也是Spring家族的,因此它和Spring Boot乃至Spring Cloud有着天然的亲近性。
从图2.1中,我们能看到Spring Data框架在项目里所起到的作用,通过它,程序员能更关注于企业的核心价值——业务实现,从而可以不必过多地关注业务数据在数据库层的存储和读取细节,这种解耦合的便利性无疑将提升系统代码的可维护性。

图2.1 Spring Data框架在项目里的示意图
在表2.1中,我们归纳了一些常见的子项目以及所对应的功能。不过在实际项目里,我们用得比较多的还是JPA组件。
表2.1 Spring Data常用子项目功能归纳表
