aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application/src
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-01 19:54:07 -0500
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-02 10:54:43 -0500
commitbd28818bdba4ede90fe80877bf6839004516000a (patch)
tree5b155a9fa886c36c89aad94b18fb71d9775f2060 /ms/blueprintsprocessor/application/src
parent409a44b5b0b510af613e2036712c340486bae410 (diff)
Enable Webflux Service.
Change-Id: I99bacee9b63aa788bb368dec60981bf19ea759c4 Issue-ID: CCSDK-781 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/blueprintsprocessor/application/src')
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java8
-rw-r--r--ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java9
2 files changed, 13 insertions, 4 deletions
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
index fc1007f7..98be9aa7 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
@@ -20,14 +20,12 @@ package org.onap.ccsdk.apps.blueprintsprocessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.Arrays;
import java.util.Collections;
@@ -39,8 +37,10 @@ import java.util.Set;
*
* @author Brinda Santh 8/13/2018
*/
-@Configuration
-@EnableSwagger2
+//@Configuration
+//@EnableSwagger2
+@SuppressWarnings("unused")
+@Deprecated
public class SwaggerConfig {
private static final Set<String> DEFAULT_PRODUCES_AND_CONSUMES =
new HashSet<>(Arrays.asList("application/json",
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
index 3742f560..796a2d79 100644
--- a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
+++ b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
@@ -35,4 +35,13 @@ public class WebConfig extends WebFluxConfigurationSupport {
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
+
+ @Override
+ public void addCorsMappings(CorsRegistry corsRegistry) {
+ corsRegistry.addMapping("/**")
+ .allowedOrigins("*")
+ .allowedMethods("*")
+ .allowedHeaders("DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range")
+ .maxAge(3600);
+ }
}