https://github.com/hzpz/mongeez-spring-boot-starter
Spring Boot Starter for Mongeez
https://github.com/hzpz/mongeez-spring-boot-starter
database mongeez spring-boot spring-data-mongo
Last synced: 4 months ago
JSON representation
Spring Boot Starter for Mongeez
- Host: GitHub
- URL: https://github.com/hzpz/mongeez-spring-boot-starter
- Owner: hzpz
- License: apache-2.0
- Created: 2015-07-31T19:34:17.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-01-07T15:58:20.000Z (over 6 years ago)
- Last Synced: 2025-06-12T20:08:02.658Z (about 1 year ago)
- Topics: database, mongeez, spring-boot, spring-data-mongo
- Language: Java
- Homepage:
- Size: 49.8 KB
- Stars: 16
- Watchers: 4
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

[](https://travis-ci.org/hzpz/mongeez-spring-boot-starter)
[](https://www.codacy.com/app/mailantimo/mongeez-spring-boot-starter)
# Spring Boot Starter for Mongeez
[Mongeez][mongeez] is a change management tool for Mongo databases.
This project is a [starter][spring-boot-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:
io.github.hzpz.spring.boot
mongeez-spring-boot-starter
2.0.1
* [Create a mongeez.xml file that includes all change logs][mongeez.xml] at `db/mongeez.xml`.
## 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][mongeez.xml])
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.
[mongeez]: https://github.com/mongeez/mongeez
[mongeez.xml]: https://github.com/mongeez/mongeez/wiki/How-to-use-mongeez#create-a-mongeezxml-file-that-include-all-change-logs
[spring-boot-starter]: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-starter-poms