EmbedMongo - Spring Factory

A builder and Spring FactoryBean for EmbedMongo

Лицензия

Лицензия

MIT
Группа

Группа

cz.jirutka.spring
Идентификатор

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

embedmongo-spring
Последняя версия

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

1.3.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

EmbedMongo - Spring Factory
A builder and Spring FactoryBean for EmbedMongo
Ссылка на сайт

Ссылка на сайт

https://github.com/jirutka/embedmongo-spring
Система контроля версий

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

https://github.com/jirutka/embedmongo-spring

Скачать embedmongo-spring

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

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
de.flapdoodle.embed : de.flapdoodle.embed.mongo jar 1.46.4
de.flapdoodle.embed : de.flapdoodle.embed.process jar 1.40.1
org.mongodb : mongo-java-driver jar 2.13.0
org.slf4j : slf4j-api jar 1.7.10

provided (1)

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

test (3)

Идентификатор библиотеки Тип Версия
org.spockframework : spock-core jar 1.0-groovy-2.3
ch.qos.logback : logback-classic jar 1.1.2
org.codehaus.groovy : groovy jar 2.3.9

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

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

Spring Factory Bean for EmbedMongo

Build Status Maven Central

Spring Factory Bean for EmbedMongo that runs “embedded” MongoDB as managed process to use in integration tests (especially with CI). Unlike EmbedMongo default settings, this factory uses Slf4j for all logging by default so you can use any logging implementation you want.

Since v1.2 a convenient builder for Java-based configuration is also provided. This builder isn’t tied with the Spring Framework, so it can be useful even for non-Spring projects.

EmbedMongo isn’t truly embedded Mongo as there’s no Java implementation of the MongoDB. It actually downloads original MongoDB binary for your platform and runs it. See embedmongo.flapdoodle.de for more information.

Usage

<bean id="mongo" class="cz.jirutka.spring.embedmongo.EmbeddedMongoFactoryBean"
      p:version="2.4.5"
      p:bindIp="127.0.0.1"
      p:port="12345" />
@Bean(destroyMethod="close")
public Mongo mongo() throws IOException {
    return new EmbeddedMongoBuilder()
            .version("2.4.5")
            .bindIp("127.0.0.1")
            .port(12345)
            .build();
}

All properties are optional and have usable default values.

Maven

Released versions are available in The Central Repository. Just add this artifact to your project:

<dependency>
    <groupId>cz.jirutka.spring</groupId>
    <artifactId>embedmongo-spring</artifactId>
    <version>1.3.1</version>
</dependency>

However if you want to use the last snapshot version, you have to add the Sonatype OSS repository:

<repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype repository for deploying snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>

Note: If you’re stuck on Java 6 for any absurd reason, use version 1.2.2.

License

This project is licensed under MIT License.

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

Версия
1.3.1
1.3.0
1.2.2
1.2.1
1.2
1.1
1.0