[community] 검색어 encoding 수정

This commit is contained in:
LEEYONGJAE 2024-09-06 17:43:04 +09:00
parent 99a093c490
commit 16128cec25

View File

@ -2,6 +2,8 @@ package com.interplug.qcast.biz.community;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -38,10 +40,11 @@ public class BoardService {
BoardResponse response = null; BoardResponse response = null;
/* [0]. QSP API (url + param) Setting */ /* [0]. QSP API (url + param) Setting */
String encodedSchTitle = URLEncoder.encode(boardRequest.getSchTitle(), StandardCharsets.UTF_8);
String url = QSP_API_URL + "/api/board/list"; String url = QSP_API_URL + "/api/board/list";
String apiUrl = String apiUrl = UriComponentsBuilder.fromHttpUrl(url)
UriComponentsBuilder.fromHttpUrl(url).queryParam("noticeNo", boardRequest.getNoticeNo()) .queryParam("noticeNo", boardRequest.getNoticeNo()).queryParam("schTitle", encodedSchTitle)
.queryParam("schTitle", boardRequest.getSchTitle())
.queryParam("schNoticeTpCd", boardRequest.getSchNoticeTpCd()) .queryParam("schNoticeTpCd", boardRequest.getSchNoticeTpCd())
.queryParam("schNoticeClsCd", boardRequest.getSchNoticeClsCd()) .queryParam("schNoticeClsCd", boardRequest.getSchNoticeClsCd())
.queryParam("startRow", boardRequest.getStartRow()) .queryParam("startRow", boardRequest.getStartRow())