diff options
author | Joseph Keenan <joseph.keenan@est.tech> | 2022-05-12 10:45:47 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-05-12 10:45:47 +0000 |
commit | ac57cca55024135a237a7d7f036f80b6b628b868 (patch) | |
tree | b668fd4ebdbb5064347eb3c09b77ce1f4d79f454 /cps-ncmp-service/src/main/java/org | |
parent | 8c0b1b62c1e88f0c0cc547bbf91d9b236839992b (diff) | |
parent | 0b80343610a215f26a7d764cc849f8e9ca44fea0 (diff) |
Merge "Add graceful shutdown for Session Manager"
Diffstat (limited to 'cps-ncmp-service/src/main/java/org')
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/NcmpConfiguration.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/NcmpConfiguration.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/NcmpConfiguration.java index 3aa17b70cb..a981022256 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/NcmpConfiguration.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/config/NcmpConfiguration.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2021 Nordix Foundation + * Copyright (C) 2021-2022 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ package org.onap.cps.ncmp.api.impl.config; import java.util.Arrays; import lombok.Getter; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -53,7 +54,7 @@ public class NcmpConfiguration { * @return rest template instance */ @Bean - @Scope("singleton") + @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON) public static RestTemplate restTemplate(final RestTemplateBuilder restTemplateBuilder) { final RestTemplate restTemplate = restTemplateBuilder.build(); setRestTemplateMessageConverters(restTemplate); |