Skip to content

Commit 496a36f

Browse files
authored
Merge pull request #80 from swyp-app-team-4/fix#79-congestion-message-generate-prompt-bug
[Fix] 혼잡도 메시지 자동 생성 프롬프트 깨짐 현상
2 parents fe2241b + dc61b45 commit 496a36f

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
package boombimapi.global.properties;
22

3+
import java.nio.charset.StandardCharsets;
4+
import java.util.Base64;
35
import org.springframework.boot.context.properties.ConfigurationProperties;
46

57
@ConfigurationProperties(prefix = "clova.prompts")
68
public record ClovaPromptProperties(
79
String autoCompleteCongestionMessage
810
) {
911

12+
public String autoCompleteCongestionMessage() {
13+
if (autoCompleteCongestionMessage == null || autoCompleteCongestionMessage.isBlank()) {
14+
return "";
15+
}
16+
// 혹시 공백/개행 들어오면 제거
17+
String compact = autoCompleteCongestionMessage.replaceAll("\\s+", "");
18+
byte[] decoded = Base64.getDecoder().decode(compact);
19+
return new String(decoded, StandardCharsets.UTF_8);
20+
}
21+
1022
}

src/main/resources/application-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spring:
1212
password: ${DB_PASSWORD}
1313
jpa:
1414
hibernate:
15-
ddl-auto: create
15+
ddl-auto: none
1616
properties:
1717
hibernate:
1818
default_schema: root # 기본 스키마

0 commit comments

Comments
 (0)