Spring Data YugabyteDB

Spring Data module for YugabyteDB.

Categories

Categories

Data
GroupId

GroupId

com.yugabyte
ArtifactId

ArtifactId

spring-data-yugabytedb
Last Version

Last Version

2.1.10-yb-1
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Data YugabyteDB
Spring Data module for YugabyteDB.
Project URL

Project URL

https://github.com/yugabyte/spring-data-yugabytedb
Source Code Management

Source Code Management

https://github.com/yugabyte/spring-data-yugabytedb.git

Download spring-data-yugabytedb

How to add to project

<!-- https://jarcasting.com/artifacts/com.yugabyte/spring-data-yugabytedb/ -->
<dependency>
    <groupId>com.yugabyte</groupId>
    <artifactId>spring-data-yugabytedb</artifactId>
    <version>2.1.10-yb-1</version>
</dependency>
// https://jarcasting.com/artifacts/com.yugabyte/spring-data-yugabytedb/
implementation 'com.yugabyte:spring-data-yugabytedb:2.1.10-yb-1'
// https://jarcasting.com/artifacts/com.yugabyte/spring-data-yugabytedb/
implementation ("com.yugabyte:spring-data-yugabytedb:2.1.10-yb-1")
'com.yugabyte:spring-data-yugabytedb:jar:2.1.10-yb-1'
<dependency org="com.yugabyte" name="spring-data-yugabytedb" rev="2.1.10-yb-1">
  <artifact name="spring-data-yugabytedb" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.yugabyte', module='spring-data-yugabytedb', version='2.1.10-yb-1')
)
libraryDependencies += "com.yugabyte" % "spring-data-yugabytedb" % "2.1.10-yb-1"
[com.yugabyte/spring-data-yugabytedb "2.1.10-yb-1"]

Dependencies

compile (17)

Group / Artifact Type Version
org.springframework.data : spring-data-commons jar 2.1.10.RELEASE
org.springframework : spring-orm jar 5.1.9.RELEASE
org.springframework : spring-context jar 5.1.9.RELEASE
org.springframework : spring-aop jar 5.1.9.RELEASE
org.springframework : spring-tx jar 5.1.9.RELEASE
org.springframework : spring-beans jar 5.1.9.RELEASE
org.springframework : spring-core jar 5.1.9.RELEASE
org.aspectj : aspectjrt jar 1.9.3
org.springframework : spring-aspects Optional jar 5.1.9.RELEASE
joda-time : joda-time Optional jar 2.10.3
org.threeten : threetenbp Optional jar 1.3.8
org.eclipse.persistence : org.eclipse.persistence.jpa Optional jar 2.6.5
org.hibernate : hibernate-core jar 5.2.17.Final
com.querydsl : querydsl-jpa Optional jar 4.2.1
org.projectlombok : lombok Optional jar 1.18.6
junit : junit jar 4.12
com.yugabyte : ysql jar 42.2.7-yb-2

provided (4)

Group / Artifact Type Version
org.springframework : spring-instrument jar 5.1.9.RELEASE
org.hibernate : hibernate-jpamodelgen jar 5.2.17.Final
com.querydsl : querydsl-apt jar 4.2.1
javax.enterprise : cdi-api Optional jar 1.0

test (10)

Group / Artifact Type Version
org.aspectj : aspectjweaver jar 1.9.3
org.hsqldb : hsqldb jar 2.4.1
org.apache.geronimo.specs : geronimo-jcdi_2.0_spec jar 1.0.1
javax.interceptor : javax.interceptor-api jar 1.2.1
javax.annotation : javax.annotation-api jar 1.3
org.apache.openwebbeans : openwebbeans-se jar 2.0.11
org.assertj : assertj-core jar 3.11.1
org.mockito : mockito-core jar 2.19.1
org.springframework : spring-test jar 5.1.9.RELEASE
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

Spring Data YugabyteDB

This project brings the power of Distributed SQL to Spring developers by using an enhanced underlying JDBC driver - which brings most features of PostgreSQL (as of v11.2) into a distributed database that is scalable and fault-tolerant. This project is based on Spring Data JPA.

Unique Features

In addition to providing most PostgreSQL features on top of a scalable and resilient distributed database, this project aims to enable the following:

  • Eliminate Load Balancer from SQL (cluster-awareness)

  • Develop Geo-Distributed Apps (topology-awareness)

  • Row Level Geo-partitioning support (partition-awareness)

Getting Started

Maven configuration

Add the Maven dependency:

<dependency>
  <groupId>com.yugabyte</groupId>
  <artifactId>spring-data-yugabytedb</artifactId>
  <version>2.1.10-yb-1</version>
</dependency>

Data source configuration

To enable the YugabyteDB configuration create configuration class:

@Configuration
public class DatabaseConfiguration extends AbstractYugabyteConfiguration {
  // Here you can override the dataSource() method to configure the DataSource in code.
}

Configure your application.properties. For instance:

spring.yugabyte.initialHost=localhost
spring.yugabyte.port=5433
spring.yugabyte.database=yugabyte
spring.yugabyte.user=yugabyte
spring.yugabyte.password=yugabyte
spring.yugabyte.maxPoolSizePerNode=8
spring.yugabyte.connectionTimeoutMs=10000
spring.yugabyte.generate-ddl=true
spring.yugabyte.packages-to-scan=com.example.spring.jpa.springdatajpaexample.domain

See also the spring-data-yugabytedb-example app.

com.yugabyte

yugabyte

The high-performance distributed SQL database for global, internet-scale apps.

Versions

Version
2.1.10-yb-1