io.github.hzpz.spring.boot:spring-boot-autoconfigure-mongeez

Spring Boot AutoConfigure for Mongeez

License

License

Categories

Categories

Spring Boot Container Microservices Auto Application Layer Libs Code Generators config Configuration
GroupId

GroupId

io.github.hzpz.spring.boot
ArtifactId

ArtifactId

spring-boot-autoconfigure-mongeez
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Spring Boot AutoConfigure for Mongeez
Project URL

Project URL

http://github.com/hzpz/spring-boot-autoconfigure-mongeez
Project Organization

Project Organization

Pivotal Software, Inc.
Source Code Management

Source Code Management

http://github.com/hzpz/spring-boot-autoconfigure-mongeez

Download spring-boot-autoconfigure-mongeez

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.hzpz.spring.boot/spring-boot-autoconfigure-mongeez/ -->
<dependency>
    <groupId>io.github.hzpz.spring.boot</groupId>
    <artifactId>spring-boot-autoconfigure-mongeez</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.hzpz.spring.boot/spring-boot-autoconfigure-mongeez/
implementation 'io.github.hzpz.spring.boot:spring-boot-autoconfigure-mongeez:1.0.1'
// https://jarcasting.com/artifacts/io.github.hzpz.spring.boot/spring-boot-autoconfigure-mongeez/
implementation ("io.github.hzpz.spring.boot:spring-boot-autoconfigure-mongeez:1.0.1")
'io.github.hzpz.spring.boot:spring-boot-autoconfigure-mongeez:jar:1.0.1'
<dependency org="io.github.hzpz.spring.boot" name="spring-boot-autoconfigure-mongeez" rev="1.0.1">
  <artifact name="spring-boot-autoconfigure-mongeez" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.hzpz.spring.boot', module='spring-boot-autoconfigure-mongeez', version='1.0.1')
)
libraryDependencies += "io.github.hzpz.spring.boot" % "spring-boot-autoconfigure-mongeez" % "1.0.1"
[io.github.hzpz.spring.boot/spring-boot-autoconfigure-mongeez "1.0.1"]

Dependencies

compile (6)

Group / Artifact Type Version
org.springframework : spring-context jar
org.springframework.boot : spring-boot-autoconfigure jar 1.2.5.RELEASE
org.springframework.data : spring-data-mongodb Optional jar
org.springframework.boot : spring-boot-configuration-processor Optional jar 1.2.5.RELEASE
org.mongodb : mongo-java-driver Optional jar 2.12.5
org.mongeez : mongeez Optional jar 0.9.4

test (4)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.hamcrest : hamcrest-library jar 1.3
org.springframework : spring-test jar

Project Modules

There are no modules declared in this project.

Maven Central Build Status Codacy Badge

Spring Boot Starter for Mongeez

Mongeez is a change management tool for Mongo databases. This project is a starter for Spring Boot that can automatically configure Mongeez and run migration scripts. The auto-configuration makes sure that the migrations happen before any Spring Data Mongo beans are initialized.

Usage

  • Make sure Spring Data Mongo is configured properly.
  • Add dependency to the Mongeez Spring Boot starter:
<dependency>
    <groupId>io.github.hzpz.spring.boot</groupId>
    <artifactId>mongeez-spring-boot-starter</artifactId>
    <version>2.0.1</version>
</dependency>

Configuration

Mongeez can be configured by setting properties with the prefix mongeez or by using the MongeezProperties bean directly.

Disable auto-configuration

To disable the auto-configuration of Mongeez completely, set the property mongeez.enabled to false.

Location of migration script

The default expected location of the migration script (see Create a mongeez.xml file that includes all change logs) is db/mongeez.xml. The simplest way to override the location is by setting the property mongeez.location.

Database

By default, the auto-configuration will configure Mongeez to use the same database that is configured for Spring Data Mongo (either by setting the property spring.data.mongodb.database or by using the MongoProperties bean directly). Override the database by setting the property mongeez.database.

Authentication

If the database requires authentication you need to set username and password twice, for Spring Data Mongo and for Mongeez (either by setting the properties mongeez.username and mongeez.password or by using the MongeezProperties bean directly). This is because Spring Data Mongo clears the password from MongoProperties after using it.

Versions

Version
1.0.1