Skip to content

Jongo auto configuration

Cyril Schumacher edited this page Feb 10, 2015 · 1 revision

Jongo auto-configuration

Requirements

For user the Twilio auto-configuration, it requires some prerequisites.

Dependencies

  • jongo

Dependency is used to create an instance of the Jongo class.

Properties

  • spring.data.mongodb.database

Database name.

Usage

application.yml

In a Spring configuration file (application.yml or application.properties)

spring:
  data:
     mongodb:
        database: MY_DATABASE_NAME

A Java class

In an annotated Java class annotation Component (or derivative):

@Service
public class CustomService {
    @Autowired
    private Jongo client;
}