diff options
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/DmiWebClientConfiguration.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/DmiWebClientConfiguration.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/DmiWebClientConfiguration.java index 4f9e8800dd..8ac2e3fc1c 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/DmiWebClientConfiguration.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/DmiWebClientConfiguration.java @@ -46,6 +46,9 @@ public class DmiWebClientConfiguration { @Value("${ncmp.dmi.httpclient.connectionTimeoutInSeconds:20000}") private Integer connectionTimeoutInSeconds; + @Value("${ncmp.dmi.httpclient.maximumInMemorySizeInMegabytes:1}") + private Integer maximumInMemorySizeInMegabytes; + @Getter @Component public static class DmiProperties { @@ -77,6 +80,9 @@ public class DmiWebClientConfiguration { .defaultHeaders(header -> header.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)) .defaultHeaders(header -> header.set(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)) .clientConnector(new ReactorClientHttpConnector(httpClient)) + .codecs(configurer -> configurer + .defaultCodecs() + .maxInMemorySize(maximumInMemorySizeInMegabytes * 1024 * 1024)) .build(); } } |