문제 상황
스프링부트 3.1.0 버전에서 mustache 파일 내 한글 깨짐 오류가 발생했다.
시도해본 것
- html 내 <head> 내 <meta> 태그 추가 -> 둘 다 넣어도 안됨
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- intelliJ 인코딩 설정 변경
- Settings -> Editor -> File Encodings
- Global Encoding/Project Encoding/Default encoding for properties files
해결 방법
yml 파일
server:
servlet:
encoding:
force-response: true
properties 파일
server.servlet.encoding.force=true
'Project > SpringBoot를 사용해서 웹 서비스를 만들어보자' 카테고리의 다른 글
템플릿 엔진이란 (0) | 2023.08.22 |
---|---|
Spring 웹 계층 (0) | 2023.08.18 |
자주 사용하는 Lombok 어노테이션 정리 (0) | 2023.08.17 |
JPA Auditing (0) | 2023.08.17 |
springboot lombok symbol method builder() 에러 해결 (0) | 2023.08.14 |