shp 생성 profile 파라미터 추가
This commit is contained in:
@@ -7,11 +7,14 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@Component
|
@Component
|
||||||
public class ExternalJarRunner {
|
public class ExternalJarRunner {
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String profile;
|
||||||
|
|
||||||
private static final long TIMEOUT_MINUTES = TimeUnit.DAYS.toMinutes(3);
|
private static final long TIMEOUT_MINUTES = TimeUnit.DAYS.toMinutes(3);
|
||||||
|
|
||||||
@@ -40,7 +43,7 @@ public class ExternalJarRunner {
|
|||||||
if (mode != null && !mode.isEmpty()) {
|
if (mode != null && !mode.isEmpty()) {
|
||||||
addArg(args, "converter.mode", mode);
|
addArg(args, "converter.mode", mode);
|
||||||
}
|
}
|
||||||
|
addArg(args, "spring.profiles.active", profile);
|
||||||
execJar(jarPath, args);
|
execJar(jarPath, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +60,7 @@ public class ExternalJarRunner {
|
|||||||
addArg(args, "upload-shp", register);
|
addArg(args, "upload-shp", register);
|
||||||
// addArg(args, "layer", layer);
|
// addArg(args, "layer", layer);
|
||||||
|
|
||||||
|
addArg(args, "spring.profiles.active", profile);
|
||||||
execJar(jarPath, args);
|
execJar(jarPath, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -48,6 +49,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
|
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
|
||||||
|
|
||||||
@Tag(name = "추론관리", description = "추론관리 API")
|
@Tag(name = "추론관리", description = "추론관리 API")
|
||||||
|
@Log4j2
|
||||||
@RequestMapping("/api/inference")
|
@RequestMapping("/api/inference")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@@ -373,6 +375,7 @@ public class InferenceResultApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Path zipPath = Path.of(path);
|
Path zipPath = Path.of(path);
|
||||||
|
log.info("shp download request path = {}", path);
|
||||||
|
|
||||||
return downloadExecutor.stream(
|
return downloadExecutor.stream(
|
||||||
new DownloadSpec(uuid, zipPath, uid + ".zip", MediaType.APPLICATION_OCTET_STREAM));
|
new DownloadSpec(uuid, zipPath, uid + ".zip", MediaType.APPLICATION_OCTET_STREAM));
|
||||||
|
|||||||
Reference in New Issue
Block a user