add customize db config to README.md (#402)
This commit is contained in:
Родитель
96514d8fe3
Коммит
b0f028b3fd
|
@ -99,6 +99,15 @@ public class AppConfiguration extends AbstractDocumentDbConfiguration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Or if you want to customize your config:
|
||||||
|
```java
|
||||||
|
public DocumentDBConfig getConfig() {
|
||||||
|
DocumentDBConfig dbConfig = DocumentDBConfig.builder(uri, key, dbName).build();
|
||||||
|
dbConfig.getConnectionPolicy().setConnectionMode(ConnectionMode.DirectHttps);
|
||||||
|
dbConfig.getConnectionPolicy().setMaxPoolSize(1000);
|
||||||
|
return dbConfig;
|
||||||
|
}
|
||||||
|
```
|
||||||
By default, `@EnableDocumentDbRepositories` will scan the current package for any interfaces that extend one of Spring Data's repository interfaces. Using it to annotate your Configuration class to scan a different root package by type if your project layout has multiple projects and it's not finding your repositories.
|
By default, `@EnableDocumentDbRepositories` will scan the current package for any interfaces that extend one of Spring Data's repository interfaces. Using it to annotate your Configuration class to scan a different root package by type if your project layout has multiple projects and it's not finding your repositories.
|
||||||
```java
|
```java
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|
Загрузка…
Ссылка в новой задаче