shp 생성 profile 파라미터 추가

This commit is contained in:
2026-02-11 10:46:02 +09:00
parent 0d13e6989f
commit 83ef7e36ed
2 changed files with 8 additions and 1 deletions

View File

@@ -7,11 +7,14 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Log4j2
@Component
public class ExternalJarRunner {
@Value("${spring.profiles.active}")
private String profile;
private static final long TIMEOUT_MINUTES = TimeUnit.DAYS.toMinutes(3);
@@ -40,7 +43,7 @@ public class ExternalJarRunner {
if (mode != null && !mode.isEmpty()) {
addArg(args, "converter.mode", mode);
}
addArg(args, "spring.profiles.active", profile);
execJar(jarPath, args);
}
@@ -57,6 +60,7 @@ public class ExternalJarRunner {
addArg(args, "upload-shp", register);
// addArg(args, "layer", layer);
addArg(args, "spring.profiles.active", profile);
execJar(jarPath, args);
}

View File

@@ -34,6 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.data.domain.Page;
import org.springframework.http.MediaType;
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;
@Tag(name = "추론관리", description = "추론관리 API")
@Log4j2
@RequestMapping("/api/inference")
@RequiredArgsConstructor
@RestController
@@ -373,6 +375,7 @@ public class InferenceResultApiController {
}
Path zipPath = Path.of(path);
log.info("shp download request path = {}", path);
return downloadExecutor.stream(
new DownloadSpec(uuid, zipPath, uid + ".zip", MediaType.APPLICATION_OCTET_STREAM));