October 2018
Intermediate to advanced
982 pages
23h 29m
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
Read now
Unlock full access