aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-12-03 11:27:32 +0000
committera.sreekumar <ajith.sreekumar@bell.ca>2021-12-14 17:58:20 +0000
commit4694c152f69380f4d3d64bde0a13d15fb59a71f3 (patch)
tree38c9e0b1117323c58536706a66830109225d6200 /main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java
parentc51fa0d4e953518571a115af4afdea80a17ed605 (diff)
Migrate pap startup & controllers to spring boot
This commit migrates pap config, startup and controllers to spring boot. Change-Id: Icf91d728160a23db614dfba6b40ddccd2f6163a5 Issue-ID: POLICY-3754 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java')
-rw-r--r--main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java b/main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java
new file mode 100644
index 00000000..d73a37d8
--- /dev/null
+++ b/main/src/main/java/org/onap/policy/pap/main/config/PapAafConfig.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 Bell Canada. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.pap.main.config;
+
+import javax.servlet.Filter;
+import org.onap.policy.pap.main.rest.PapAafFilter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+@Configuration
+@Profile(value = {"aaf-auth"})
+public class PapAafConfig {
+
+ /**
+ * Method to return Pap Aaf filter.
+ *
+ * @return Filter papAafFilter
+ */
+ @Bean
+ public Filter papAafFilter() {
+ return new PapAafFilter();
+ }
+}