dockds

Docker contained database autoconfiguration for Spring Boot

Лицензия

Лицензия

Группа

Группа

pl.touk
Идентификатор

Идентификатор

dockds
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

dockds
Docker contained database autoconfiguration for Spring Boot
Организация-разработчик

Организация-разработчик

TouK
Система контроля версий

Система контроля версий

https://github.com/TouK/dockds

Скачать dockds

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/pl.touk/dockds/ -->
<dependency>
    <groupId>pl.touk</groupId>
    <artifactId>dockds</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/pl.touk/dockds/
implementation 'pl.touk:dockds:1.1.0'
// https://jarcasting.com/artifacts/pl.touk/dockds/
implementation ("pl.touk:dockds:1.1.0")
'pl.touk:dockds:jar:1.1.0'
<dependency org="pl.touk" name="dockds" rev="1.1.0">
  <artifact name="dockds" type="jar" />
</dependency>
@Grapes(
@Grab(group='pl.touk', module='dockds', version='1.1.0')
)
libraryDependencies += "pl.touk" % "dockds" % "1.1.0"
[pl.touk/dockds "1.1.0"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-jdbc jar 1.5.4.RELEASE
com.spotify : docker-client jar 8.7.3
org.springframework : spring-web jar

provided (1)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-test jar 1.5.4.RELEASE

test (5)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-data-jpa jar 1.5.4.RELEASE
org.projectlombok : lombok jar 1.16.16
org.assertj : assertj-core jar 3.8.0
org.postgresql : postgresql jar 42.1.1
mysql : mysql-connector-java jar 5.1.42

Модули Проекта

Данный проект не имеет модулей.

dockds

Build Status

With a little help of Docker embed PostgreSQL or MySQL in your Spring Boot application or test just as you can do with H2 or HSQLDB.

Usage

Assuming you have either PostgreSQL or MySQL driver in your depedencies list, just add yet the following dependency:

<dependency>
  <groupId>pl.touk</groupId>
  <artifactId>dockds</artifactId>
  <version>1.2.0</version>
  <!-- Probably in most cases you will want -->
  <!-- <scope>test</scope> -->
</dependency>

Unless you have a datasource url specifified in application.properties a database instance in a Docker container will be launched along with your applicaton context.

Just as if you had an embedded database (e.g. HSQLDB) driver in your pom.xml.

If you have tests using an embedded database with @DataJpaTest annotation, you substitute it with @DockerizedDataJpaTest. This way you will be able to use native queries in your JPA repositories.

Getting Started

  1. Complete guide Accessing Data with JPA
  2. Add the above dependency to pom.xml or build.gradle
  3. Replace H2 with PostgreSQL or MySQL in the pom.xml or build.gradle
  4. Replace @DataJpaTest with @DockerizedDataJpaTest in CustomerRepositoryTests (which is not described in the guide but is available in the provided source repository)
pl.touk

TouK

We’re a software house based in Warsaw. We deliver custom IT systems.

Версии библиотеки

Версия
1.1.0
1.0.0
1.0.0-RC4
1.0.0-RC3