다운로드 호출 로그관리 작업

This commit is contained in:
2026-01-19 17:11:41 +09:00
parent 9a080deb31
commit 5a9ddc8c66
4 changed files with 136 additions and 6 deletions

View File

@@ -10,11 +10,18 @@ import org.locationtech.jts.geom.Polygon;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfig implements WebMvcConfigurer {
private final FileDownloadInteceptor fileDownloadInteceptor;
public WebConfig(FileDownloadInteceptor fileDownloadInteceptor) {
this.fileDownloadInteceptor = fileDownloadInteceptor;
}
@Bean
public ObjectMapper objectMapper() {
SimpleModule module = new SimpleModule();
@@ -29,4 +36,11 @@ public class WebConfig implements WebMvcConfigurer {
return Jackson2ObjectMapperBuilder.json().modulesToInstall(module).build();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry
.addInterceptor(fileDownloadInteceptor)
.addPathPatterns("/api/inference/download/**"); // 추론 파일 다운로드 API만 //TODO 추후 추가
}
}