U hoeft alleen de respectieve mongobd-eigenschappen te definiëren in application.properties bestand of als je de yml-syntaxis wilt gebruiken, definieer dan rekwisieten in application.yml . Onder src/main/resources , application.properties zou er al moeten zijn.
application.properties :
spring.data.mongodb.host=<hostname>
spring.data.mongodb.port=27017
spring.data.mongodb.database=<dbname>
spring.data.mongodb.username=<usernamr>
spring.data.mongodb.password=******
Of
application.yml :
spring:
data:
mongodb:
host: <hostname>
port: 27017
database: <dbname>
username: <usernamr>
password: ******