- Spring 5.0 By Example
- Claudio Eduardo de Oliveira
- 260字
- 2021-06-24 19:17:26
Spring Data
Spring Data is an interesting module that provides the easiest way to manage application data with Spring-based programming. The project is an umbrella project, with subprojects to support different databases technologies, even relational and nonrelational databases. The Spring Team supports some databases technologies, such as Apache Cassandra, Apache Solr, Redis, and JPA Specification, and the community maintains the other exciting projects, such as ElasticSearch, Aerospike, DynamoDb, and Couchbase. The full list of projects can be found at http://projects.spring.io/spring-data.
The goal is to remove the boilerplate code from the persistence code. In general, the data access layer is quite similar, even in different projects, differing only in the project model, and Spring Data provides a powerful way to map the domain model and repository abstraction.
There are some central interfaces; they're a kind of marker to instruct the framework to choose the correct implementation. Under the hood, Spring will create a proxy and delegate the correct implementation. The amazing thing here is that developers don't have to write any persistence code and then take care of this code; they simply choose the required technology and Spring takes care of the rest.
The central interfaces are CrudRepository and PagingAndSortingRepository, and their names are self-explanatory. CrudRepository implements the CRUD behaviors, such as create, retrieval, update, and delete. PagingAndSortingRepository is an extension of CrudRepository and adds some features such as paging and sorting. Usually, we will find derivations of these interfaces such as MongoRepository, which interacts with MongoDB database technology.
- 新編Visual Basic程序設(shè)計上機實驗教程
- Learn ECMAScript(Second Edition)
- SQL Server 從入門到項目實踐(超值版)
- Java 9 Concurrency Cookbook(Second Edition)
- LabVIEW程序設(shè)計基礎(chǔ)與應(yīng)用
- 技術(shù)領(lǐng)導(dǎo)力:程序員如何才能帶團隊
- 編寫高質(zhì)量代碼:改善C程序代碼的125個建議
- PostgreSQL Replication(Second Edition)
- concrete5 Cookbook
- 機器學(xué)習(xí)與R語言實戰(zhàn)
- Internet of Things with ESP8266
- Visualforce Developer’s guide
- Buildbox 2.x Game Development
- 和孩子一起學(xué)編程:用Scratch玩Minecraft我的世界
- C++面向?qū)ο蟪绦蛟O(shè)計教程