aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/org/onap/portal/history/configuration/PortalHistoryConfig.java4
-rw-r--r--app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java2
-rw-r--r--app/src/main/java/org/onap/portal/history/configuration/package-info.java25
-rw-r--r--app/src/main/java/org/onap/portal/history/controller/ActionsController.java4
-rw-r--r--app/src/main/java/org/onap/portal/history/util/Logger.java5
5 files changed, 4 insertions, 36 deletions
diff --git a/app/src/main/java/org/onap/portal/history/configuration/PortalHistoryConfig.java b/app/src/main/java/org/onap/portal/history/configuration/PortalHistoryConfig.java
index 85304b9..9a42214 100644
--- a/app/src/main/java/org/onap/portal/history/configuration/PortalHistoryConfig.java
+++ b/app/src/main/java/org/onap/portal/history/configuration/PortalHistoryConfig.java
@@ -23,12 +23,10 @@ package org.onap.portal.history.configuration;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.ConstructorBinding;
-import javax.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotBlank;
@Data
-@ConstructorBinding
@ConfigurationProperties("portal-history")
public class PortalHistoryConfig {
diff --git a/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java b/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java
index 529cbc3..2295a5f 100644
--- a/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java
+++ b/app/src/main/java/org/onap/portal/history/configuration/SchedulerConfig.java
@@ -24,7 +24,6 @@ package org.onap.portal.history.configuration;
import org.onap.portal.history.services.ActionsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -37,7 +36,6 @@ public class SchedulerConfig {
private final ActionsService actionsService;
private final PortalHistoryConfig portalHistoryConfig;
- @Autowired
public SchedulerConfig(ActionsService actionsService, PortalHistoryConfig portalHistoryConfig){
this.actionsService = actionsService;
this.portalHistoryConfig = portalHistoryConfig;
diff --git a/app/src/main/java/org/onap/portal/history/configuration/package-info.java b/app/src/main/java/org/onap/portal/history/configuration/package-info.java
deleted file mode 100644
index ccaa303..0000000
--- a/app/src/main/java/org/onap/portal/history/configuration/package-info.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *
- * Copyright (c) 2022. Deutsche Telekom AG
- *
- * 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
- *
- *
- */
-
-@ParametersAreNonnullByDefault
-package org.onap.portal.history.configuration;
-
-import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/app/src/main/java/org/onap/portal/history/controller/ActionsController.java b/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
index ab59806..8339d65 100644
--- a/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
+++ b/app/src/main/java/org/onap/portal/history/controller/ActionsController.java
@@ -23,10 +23,6 @@ package org.onap.portal.history.controller;
import java.util.Optional;
-import javax.validation.Valid;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-
import org.onap.portal.history.configuration.PortalHistoryConfig;
import org.onap.portal.history.openapi.api.ActionsApi;
import org.onap.portal.history.openapi.model.ActionResponse;
diff --git a/app/src/main/java/org/onap/portal/history/util/Logger.java b/app/src/main/java/org/onap/portal/history/util/Logger.java
index 4cb3420..01b159c 100644
--- a/app/src/main/java/org/onap/portal/history/util/Logger.java
+++ b/app/src/main/java/org/onap/portal/history/util/Logger.java
@@ -24,6 +24,7 @@ package org.onap.portal.history.util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
+import org.springframework.http.HttpStatusCode;
import java.net.URI;
@@ -47,8 +48,8 @@ public class Logger {
* @param xRequestId from the request header
* @param code http status of the response
*/
- public static void responseLog(String xRequestId, HttpStatus code) {
- log.info("Portal-history - response - X-Request-Id {} {}", xRequestId, code);
+ public static void responseLog(String xRequestId, HttpStatusCode httpStatusCode) {
+ log.info("Portal-history - response - X-Request-Id {} {}", xRequestId, httpStatusCode);
}
/**