From 50d8a9e3b9941ba0baf12dba2097c5098e1ffcce Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 19 Mar 2026 08:41:03 +0900 Subject: [PATCH 1/2] =?UTF-8?q?HttpMediaTypeNotAcceptableException=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=EB=B0=9C=EC=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/config/Exception/GlobalExceptionHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/interplug/qcast/config/Exception/GlobalExceptionHandler.java b/src/main/java/com/interplug/qcast/config/Exception/GlobalExceptionHandler.java index 3d556324..85f85bfb 100644 --- a/src/main/java/com/interplug/qcast/config/Exception/GlobalExceptionHandler.java +++ b/src/main/java/com/interplug/qcast/config/Exception/GlobalExceptionHandler.java @@ -1,6 +1,7 @@ package com.interplug.qcast.config.Exception; import lombok.extern.slf4j.Slf4j; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.annotation.ExceptionHandler; @@ -12,6 +13,7 @@ public class GlobalExceptionHandler { @ExceptionHandler(HttpRequestMethodNotSupportedException.class) protected ResponseEntity handle(HttpRequestMethodNotSupportedException e) { return ResponseEntity.badRequest() + .contentType(MediaType.APPLICATION_JSON) .body(ErrorResponse.of(ErrorCode.METHOD_NOT_ALLOWED.getMessage())); } @@ -19,6 +21,7 @@ public class GlobalExceptionHandler { protected ResponseEntity handle(BaseException e) { final ErrorCode errorCode = e.getErrorCode(); return ResponseEntity.status(errorCode.getStatus()) + .contentType(MediaType.APPLICATION_JSON) .body(ErrorResponse.of(errorCode.getMessage())); } @@ -27,14 +30,18 @@ public class GlobalExceptionHandler { final ErrorCode errorCode = e.getErrorCode(); if (e.getMessage() == null) { return ResponseEntity.status(errorCode.getStatus()) + .contentType(MediaType.APPLICATION_JSON) .body(ErrorResponse.of(errorCode.getMessage())); } - return ResponseEntity.status(errorCode.getStatus()).body(ErrorResponse.of(e.getMessage())); + return ResponseEntity.status(errorCode.getStatus()) + .contentType(MediaType.APPLICATION_JSON) + .body(ErrorResponse.of(e.getMessage())); } @ExceptionHandler(Exception.class) protected ResponseEntity handle(Exception e) { return ResponseEntity.internalServerError() + .contentType(MediaType.APPLICATION_JSON) .body(ErrorResponse.of(ErrorCode.INTERNAL_SERVER_ERROR.getMessage())); } } -- 2.47.2 From 4db2ddfd83f44dc3993b7074316eb212f044ea06 Mon Sep 17 00:00:00 2001 From: ysCha Date: Thu, 19 Mar 2026 15:26:47 +0900 Subject: [PATCH 2/2] =?UTF-8?q?CATEGORY,=20LEN(CATEGORY)=20AS=20M=5FUSER?= =?UTF-8?q?=2020=EC=9E=90=20=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qcast/batch/system/AdminUserConfiguration.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/interplug/qcast/batch/system/AdminUserConfiguration.java b/src/main/java/com/interplug/qcast/batch/system/AdminUserConfiguration.java index 15d71ffd..d071c82f 100644 --- a/src/main/java/com/interplug/qcast/batch/system/AdminUserConfiguration.java +++ b/src/main/java/com/interplug/qcast/batch/system/AdminUserConfiguration.java @@ -71,7 +71,12 @@ public class AdminUserConfiguration implements JobExecutionListener { @Bean public ItemProcessor adminUserProcessor() { - return item -> item; + return item -> { + if (item.getCategory() != null && item.getCategory().length() > 20) { + item.setCategory(item.getCategory().substring(0, 20)); + } + return item; + }; } @Bean -- 2.47.2