This commit is contained in:
Anthony Stirling
2023-12-29 20:48:21 +00:00
parent 610ff22abe
commit 1b2df20fdd
12 changed files with 79 additions and 37 deletions

View File

@@ -28,7 +28,12 @@ public class ApiDocService {
private String getApiDocsUrl() {
String contextPath = servletContext.getContextPath();
return "http://localhost:8080" + contextPath + "/v1/api-docs";
String port = System.getProperty("local.server.port");
if(port == null || port.length() == 0) {
port="8080";
}
return "http://localhost:"+ port + contextPath + "/v1/api-docs";
}

View File

@@ -109,7 +109,7 @@ public class PipelineDirectoryProcessor {
private PipelineConfig readAndParseJson(Path jsonFile) throws IOException {
String jsonString = new String(Files.readAllBytes(jsonFile), StandardCharsets.UTF_8);
logger.info("Reading JSON file: {}", jsonFile);
logger.debug("Reading JSON file: {}", jsonFile);
return objectMapper.readValue(jsonString, PipelineConfig.class);
}
@@ -118,7 +118,7 @@ public class PipelineDirectoryProcessor {
validateOperation(operation);
File[] files = collectFilesForProcessing(dir, jsonFile, operation);
if(files == null || files.length == 0) {
logger.info("No files detected for {} ", dir);
logger.debug("No files detected for {} ", dir);
return;
}
List<File> filesToProcess = prepareFilesForProcessing(files, processingDir);

View File

@@ -238,7 +238,7 @@ public class PipelineProcessor {
for (File file : files) {
Path path = Paths.get(file.getAbsolutePath());
System.out.println("Reading file: " + path); // debug statement
logger.info("Reading file: " + path); // debug statement
if (Files.exists(path)) {
Resource fileResource = new ByteArrayResource(Files.readAllBytes(path)) {
@@ -249,7 +249,7 @@ public class PipelineProcessor {
};
outputFiles.add(fileResource);
} else {
System.out.println("File not found: " + path); // debug statement
logger.info("File not found: " + path);
}
}
logger.info("Files successfully loaded. Starting processing...");