Spring Data Relational
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
2.4 KiB

---
title: Spring Data JDBC
badges:
twitter: SpringData
custom:
- name: Source (GitHub)
url: https://github.com/spring-projects/spring-data-jdbc
icon: github
- name: Issues (JIRA)
url: http://jira.springsource.org/browse/DATAJDBC
icon: tracking
- name: StackOverflow
url: http://stackoverflow.com/questions/tagged/spring-data-jdbc
icon: stackoverflow
---
<!DOCTYPE HTML>
<html lang="en-US">
{% capture parent_link %}
[Spring Data]({{ site.projects_site_url }}/spring-data)
{% endcapture %}
{% capture billboard_description %}
Spring Data JDBC, part of the larger <a href="/spring-data">Spring
Data</a> family, makes it easy to easily implement JDBC based
repositories. This module deals with enhanced support for JDBC based
data access layers. It makes it easier to build Spring-powered
applications that use data access technologies.
{% endcapture %}
{% capture main_content %}
## This is NOT an ORM
Spring Data JDBC does not try to be an ORM. It is not a competitor to JPA. Instead it is more of a construction kit for your personal ORM that you can define the way you like or need it.
This means that it does rather little out of the box. But it offers plenty of places where you can put your own logic, or integrate it with the technology of your choice for generating SQL statements.
## The Aggregate Root
Spring Data repositories are inspired by the repository as described in the book Domain Driven Design by Eric Evans. One consequence of this is that you should have a repository per Aggregate Root. Aggregate Root is another concept from the same book and describes an entity which controls the lifecycle of other entities which together are an Aggregate. An Aggregate is a subset of your model which is consistent between method calls to your Aggregate Root.
Spring Data JDBC tries its best to encourage modelling your domain along these ideas.
## Features
- CRUD operations for simple aggregates with customizable `NamingStrategy`.
- Support for `@Query` annotations.
- Support for MyBatis queries.
- Events.
- JavaConfig based repository configuration by introducing `@EnableJdbcRepositories`.
<span id="quick-start"></span>
## Quick Start
{% include download_widget.md %}
{% endcapture %}
{% capture related_resources %}
## Related Resources
### Sample Projects
* [Spring Data JDBC Examples](https://github.com/spring-projects/spring-data-examples/tree/master/jdbc)
{% endcapture %}
{% include project_page.html %}
</html>