MongoDB Binding

This change expands the MongoDB bindings to handle more properties.

[resolves #6]

Signed-off-by: Ben Hale <bhale@vmware.com>
This commit is contained in:
Ben Hale
2020-05-11 15:45:57 -07:00
parent c864bbaaed
commit 0416df43f7
3 changed files with 29 additions and 1 deletions

View File

@@ -43,7 +43,14 @@ public final class MongoDbBindingsPropertiesProcessor implements BindingsPropert
bindings.filterBindings(KIND).forEach(binding -> {
MapMapper map = new MapMapper(binding.getSecret(), properties);
map.from("authentication-database").to("spring.mongodb.authentication-database");
map.from("database").to("spring.mongodb.database");
map.from("grid-fs-database").to("spring.mongodb.grid-fs-database");
map.from("host").to("spring.mongodb.host");
map.from("password").to("spring.mongodb.password");
map.from("port").to("spring.mongodb.port");
map.from("uri").to("spring.mongodb.uri");
map.from("username").to("spring.mongodb.username");
});
}