diff options
author | Renu Kumari <renu.kumari@bell.ca> | 2021-09-02 10:30:09 -0400 |
---|---|---|
committer | Renu Kumari <renu.kumari@bell.ca> | 2021-09-02 11:44:57 -0400 |
commit | cd048075b11eef88501619da0068d5eb6dd330f7 (patch) | |
tree | 92f4feaad6d0d92170eb4d1949686972e5840966 /cps-service/src/main | |
parent | 88cadd3f3aaa22cccb0d2159cf57fb2b84d440a2 (diff) |
Add property to enable Notification Sevice async processing
- made notification service synchronous by default
- added new property to enable async processing if required
Issue-ID: CPS-630
Signed-off-by: Renu Kumari <renu.kumari@bell.ca>
Change-Id: I28c2c98d7a79219a5932732d2940f5ac37bf1653
Diffstat (limited to 'cps-service/src/main')
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/config/AsyncConfig.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/config/AsyncConfig.java b/cps-service/src/main/java/org/onap/cps/config/AsyncConfig.java index 4c961598e4..2667ef4909 100644 --- a/cps-service/src/main/java/org/onap/cps/config/AsyncConfig.java +++ b/cps-service/src/main/java/org/onap/cps/config/AsyncConfig.java @@ -22,6 +22,7 @@ package org.onap.cps.config; import javax.validation.constraints.Min; import lombok.Setter; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -32,7 +33,8 @@ import org.springframework.validation.annotation.Validated; @EnableAsync @Configuration -@ConfigurationProperties("notification.async-executor") +@ConditionalOnProperty(name = "notification.async.enabled", havingValue = "true", matchIfMissing = false) +@ConfigurationProperties("notification.async.executor") @Validated @Setter public class AsyncConfig { |