shp파일 바꾸는로직정리
This commit is contained in:
@@ -48,7 +48,9 @@ public class SecurityConfig {
|
|||||||
auth
|
auth
|
||||||
|
|
||||||
// .requestMatchers("/chunk_upload_test.html").authenticated()
|
// .requestMatchers("/chunk_upload_test.html").authenticated()
|
||||||
.requestMatchers("/monitor/health", "/monitor/health/**")
|
.requestMatchers("/monitor/health"
|
||||||
|
, "/monitor/health/**"
|
||||||
|
)
|
||||||
.permitAll()
|
.permitAll()
|
||||||
|
|
||||||
// 맵시트 영역 전체 허용 (우선순위 최상단)
|
// 맵시트 영역 전체 허용 (우선순위 최상단)
|
||||||
@@ -71,6 +73,10 @@ public class SecurityConfig {
|
|||||||
.requestMatchers("/api/test/review")
|
.requestMatchers("/api/test/review")
|
||||||
.hasAnyRole("ADMIN", "REVIEWER")
|
.hasAnyRole("ADMIN", "REVIEWER")
|
||||||
|
|
||||||
|
// shapefile 생성 테스트 API - 인증 없이 접근 가능
|
||||||
|
.requestMatchers("/api/test/make-shapefile")
|
||||||
|
.permitAll()
|
||||||
|
|
||||||
// ASYNC/ERROR 재디스패치는 막지 않기 (다운로드/스트리밍에서 필수)
|
// ASYNC/ERROR 재디스패치는 막지 않기 (다운로드/스트리밍에서 필수)
|
||||||
.dispatcherTypeMatchers(DispatcherType.ASYNC, DispatcherType.ERROR)
|
.dispatcherTypeMatchers(DispatcherType.ASYNC, DispatcherType.ERROR)
|
||||||
.permitAll()
|
.permitAll()
|
||||||
@@ -113,7 +119,8 @@ public class SecurityConfig {
|
|||||||
"/api/user/**",
|
"/api/user/**",
|
||||||
"/api/my/menus",
|
"/api/my/menus",
|
||||||
"/api/training-data/label/**",
|
"/api/training-data/label/**",
|
||||||
"/api/training-data/review/**")
|
"/api/training-data/review/**"
|
||||||
|
)
|
||||||
.authenticated()
|
.authenticated()
|
||||||
|
|
||||||
// 나머지는 메뉴권한
|
// 나머지는 메뉴권한
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.kamco.cd.kamcoback.test;
|
||||||
|
|
||||||
|
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||||
|
import com.kamco.cd.kamcoback.scheduler.service.ShpPipelineService;
|
||||||
|
import io.swagger.v3.oas.annotations.Hidden;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
|
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.ErrorResponse;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Hidden
|
||||||
|
@Tag(name = "test shape api", description = "test shape api")
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
|
||||||
|
@RequestMapping("/api/test")
|
||||||
|
public class TestShapeApiController {
|
||||||
|
|
||||||
|
private final ShpPipelineService shpPipelineService;
|
||||||
|
|
||||||
|
@Operation(summary = "shapefile 생성 테스트", description = "지정된 inference ID와 batch ID 목록으로 shapefile을 생성합니다.")
|
||||||
|
@ApiResponses({
|
||||||
|
@ApiResponse(
|
||||||
|
responseCode = "200",
|
||||||
|
description = "shapefile 생성 요청 성공",
|
||||||
|
content = @Content(schema = @Schema(implementation = String.class))),
|
||||||
|
@ApiResponse(
|
||||||
|
responseCode = "400",
|
||||||
|
description = "잘못된 요청 데이터",
|
||||||
|
content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
|
||||||
|
@ApiResponse(
|
||||||
|
responseCode = "500",
|
||||||
|
description = "서버 오류",
|
||||||
|
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))
|
||||||
|
})
|
||||||
|
@GetMapping("/make-shapefile")
|
||||||
|
public ApiResponseDto<String> makeShapeFile(
|
||||||
|
@RequestParam String inferenceId,
|
||||||
|
@RequestParam List<Long> batchIds) {
|
||||||
|
shpPipelineService.makeShapeFile(inferenceId, batchIds);
|
||||||
|
return ApiResponseDto.ok("Shapefile 생성이 시작되었습니다. inferenceId: " + inferenceId);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user