Spring Data
Spring Data’s mission(任务, 使命) is to provide a familiar(熟悉的) and consistent(一致的), Spring-based programming model for data access while still retaining(保留,保持) the special traits(人的个性,显著的特点,特征) of the underlying(底层的) data store.
It makes it easy to use data access technologies, relational and non-relational databases, map-reduce frameworks, and cloud-based data services. This is an umbrella project which contains many subprojects that are specific to a given database. The projects are developed by working together with many of the companies and developers that are behind these exciting technologies.
Features
Release train
Spring Data is an umbrella project consisting of independent projects with, in principle, different release cadences(不同的发行节奏). To manage the portfolio(文件夹), a BOM (Bill of Materials - see this example) is published with a curated set of(一个策划组) dependencies on the individual project. The release trains have names, not versions, to avoid confusion with the sub-projects.
The names are an alphabetic sequence(字母顺序) (so you can sort them chronologically) with names of famous computer scientists and software developers. When point releases of the individual projects accumulate to(积累) a critical mass, or if there is a critical bug(一个关键的错误) in one of them that needs to be available to everyone, the release train will push out “service releases” with names ending “-SRX”, where “X” is a number.
Currently the release train contains the following modules:
Quick Start
For a quick taste(尝,品尝), look at the following domain object:
@Entity
public class Employee {
private @Id @GeneratedValue Long id;
private String firstName, lastName, description;
private Employee() {}
public Employee(String firstName, String lastName, String description) {
this.firstName = firstName;
this.lastName = lastName;
this.description = description;
}
}
This defines a simple JPA entity with a few fields. The following code shows a simple repository definition:
public interface EmployeeRepository extends CrudRepository<Employee, Long> {
Employee findByFirstName(String firstName);
List<Employee> findByLastName(String lastName);
}
This interface extends Spring Data’s CrudRepository and defines the type (Employee) and the id type (Long). Put this code inside a Spring Boot application with spring-boot-starter-data-jpa like this:@SpringBootApplication
public class MyApp {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}
Launch your app and Spring Data (having been autoconfigured by Boot, SQL or NoSQL) will automatically craft a concrete set of operations:On top of the CRUD operations inherited from CrudRepository, the interface defines two query methods.
Spring Boot starters
If you are using Spring Boot, you will inherit(继承) predefined versions for each project. To plugin a newer or older release train, configure the spring-data-releasetrain.version property to the release train iteration(迭代) name you want to use.
Spring Boot provides so called started POMs for a variety of SPring Data modules which pull in a curated set of dependencies you’ll need to use the individual modules. For details on that see the Spring Boot reference documentation.
说明:
1. MapReduce:MapReduce is a programming model and an associated implementation for processing and generating big data sets with a parallel(并行), distributed algorithm on a cluster。(来自:wikipedia)
2. GemFire: Pivotal GemFire is the distributed, in-memory database for developers who are building the highest scaling(定标;缩放比例) and performing data-centric apps in the world.(来自:官网 csdn blogs)
3. JPA:The Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition.(Java持久性API(Java Persistence API,JPA)是一种Java应用程序编程接口规范,它描述了在使用Java平台标准版和Java平台企业版的应用程序中管理关系数据。)(来自:wikipedia)
4. SPIs:没找到
5. LDAP:轻量级目录访问协议,The Lightweight Directory Access Protocol (LDAP; /ˈɛldæp/) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network (来自:Wikipedia)
6. MongoDB:MongoDB (from humongous) is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.(MongoDB(来自humongous)是一个免费且开源的跨平台的面向文档的数据库程序。分类为NoSQL数据库程序,MongoDB使用类似JSON的文档和模式。)(来自:Wikipedia)
7. RESTful:Representational(具有代表性的) state transfer (REST) or RESTful web services are a way of providing interoperability(互用性,协同工作的能力) between computer systems on the Internet. REST-compliant(兼容) Web services allow requesting systems to access and manipulate textual representations(操纵文本表示) of Web resources using a uniform(规格一致的) and predefined(预定义的) set of stateless(无状态) operations. Other forms of Web services exist, which expose(暴露) their own arbitrary(任意的) sets of operations such as WSDL(网络服务描述语言是Web Service的描述语言,它包含一系列描述某个web service的定义,来自:百度百科) and SOAP(简单对象访问协议,来自:百度百科).(来自:wikipedia)
8. Cassandra:开源分布式NoSQL数据库系统,参看之前笔记,或官网,或百度百科
9. Apache Hadoop:Apache Hadoop是一套用于在由通用硬件构建的大型集群上运行应用程序的框架。它实现了Map/Reduce编程范型,计算任务会被分割成小块(多次)运行在不同的节点上。除此之外,它还提供了一款分布式文件系统(HDFS),数据被存储在计算节点上以提供极高的跨数据中心聚合带宽。(来自:百度百科)
10. Pig&Hive:(参考:csdn)
11. S3:Database Backup Amazon S3 to create Database Backup & Restore Database Backup easy. Database Backups can be uploaded to Amazon S3 Cloud to store database backup on safe place – Amazon S3 Cloud (来自:workpress 文档)
12. GridFS:GridFS是一种将大型文件存储在MongoDB的文件规范。所有官方支持的驱动均实现了GridFS规范。(来自:百度百科)