February 2018
Intermediate to advanced
356 pages
9h 10m
English
Before we create our repositories, we will configure the MongoDB connection. The repository layer abstracts the driver implementation, but is necessary to configure the driver correctly.
On the resources directory, we will change the application.yaml file, previously configured for the Spring Data JPA. The Spring Framework supports the configuration through the YAML file. This kind of file is more readable for humans and has a kind of hierarchy. These features are the reason to choose this extension.
The application.yaml file should be like the following example:
spring: data: mongodb: database: cms host: localhost port: 27017