merge develop_add_log
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.kamco.cd.kamcoback.config;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "file")
|
||||
public class FileProperties {
|
||||
|
||||
private String root;
|
||||
private String nfs;
|
||||
private String syncRootDir;
|
||||
private String syncTmpDir;
|
||||
private String syncFileExtention;
|
||||
private String datasetDir;
|
||||
private String datasetTmpDir;
|
||||
private String modelDir;
|
||||
private String modelTmpDir;
|
||||
private String modelFileExtention;
|
||||
private String ptPath;
|
||||
private String datasetResponse;
|
||||
private TrainingData trainingData;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class TrainingData {
|
||||
private String geojsonDir;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.kamco.cd.kamcoback.config;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "inference")
|
||||
public class InferenceProperties {
|
||||
|
||||
private String nfs;
|
||||
private String url;
|
||||
private String batchUrl;
|
||||
private String geojsonDir;
|
||||
private String jarPath;
|
||||
private String inferenceServerName;
|
||||
}
|
||||
@@ -16,6 +16,8 @@ public class StartupLogger {
|
||||
|
||||
private final Environment environment;
|
||||
private final DataSource dataSource;
|
||||
private final FileProperties fileProperties;
|
||||
private final InferenceProperties inferenceProperties;
|
||||
|
||||
@EventListener(ApplicationReadyEvent.class)
|
||||
public void logStartupInfo() {
|
||||
@@ -79,6 +81,25 @@ public class StartupLogger {
|
||||
│ DDL Auto : %s
|
||||
│ JDBC Batch Size : %s
|
||||
│ Fetch Batch Size : %s
|
||||
╠════════════════════════════════════════════════════════════════════════════════╣
|
||||
║ FILE CONFIGURATION ║
|
||||
╠────────────────────────────────────────────────────────────────────────────────╣
|
||||
│ Root Directory : %s
|
||||
│ NFS Mount Path : %s
|
||||
│ Sync Root Dir : %s
|
||||
│ Sync Tmp Dir : %s
|
||||
│ Dataset Dir : %s
|
||||
│ Model Dir : %s
|
||||
│ PT Path : %s
|
||||
╠════════════════════════════════════════════════════════════════════════════════╣
|
||||
║ INFERENCE CONFIGURATION ║
|
||||
╠────────────────────────────────────────────────────────────────────────────────╣
|
||||
│ NFS Mount Path : %s
|
||||
│ Inference URL : %s
|
||||
│ Batch URL : %s
|
||||
│ GeoJSON Dir : %s
|
||||
│ JAR Path : %s
|
||||
│ Server Names : %s
|
||||
╚════════════════════════════════════════════════════════════════════════════════╝
|
||||
""",
|
||||
profileInfo,
|
||||
@@ -89,7 +110,24 @@ public class StartupLogger {
|
||||
showSql,
|
||||
ddlAuto,
|
||||
batchSize,
|
||||
batchFetchSize);
|
||||
batchFetchSize,
|
||||
fileProperties.getRoot() != null ? fileProperties.getRoot() : "N/A",
|
||||
fileProperties.getNfs() != null ? fileProperties.getNfs() : "N/A",
|
||||
fileProperties.getSyncRootDir() != null ? fileProperties.getSyncRootDir() : "N/A",
|
||||
fileProperties.getSyncTmpDir() != null ? fileProperties.getSyncTmpDir() : "N/A",
|
||||
fileProperties.getDatasetDir() != null ? fileProperties.getDatasetDir() : "N/A",
|
||||
fileProperties.getModelDir() != null ? fileProperties.getModelDir() : "N/A",
|
||||
fileProperties.getPtPath() != null ? fileProperties.getPtPath() : "N/A",
|
||||
inferenceProperties.getNfs() != null ? inferenceProperties.getNfs() : "N/A",
|
||||
inferenceProperties.getUrl() != null ? inferenceProperties.getUrl() : "N/A",
|
||||
inferenceProperties.getBatchUrl() != null ? inferenceProperties.getBatchUrl() : "N/A",
|
||||
inferenceProperties.getGeojsonDir() != null
|
||||
? inferenceProperties.getGeojsonDir()
|
||||
: "N/A",
|
||||
inferenceProperties.getJarPath() != null ? inferenceProperties.getJarPath() : "N/A",
|
||||
inferenceProperties.getInferenceServerName() != null
|
||||
? inferenceProperties.getInferenceServerName()
|
||||
: "N/A");
|
||||
|
||||
log.info(startupMessage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user