728x90
오류
Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content-Type 'text/plain;charset=UTF-8' is not supported]
postman 에서 post 메소드로 올바르게 전송했는데 위의 오류가 발생했다.
Body에 담을 때 raw - Text 를 선택해서 json 형식인지 인지하지 못해 발생한 문제이다.

해결
방법 1. Body - raw - JSON 으로 변경한다.

방법 2. Headers에 "Content-Type:application/json" 을 작성한다.

반응형
'Error' 카테고리의 다른 글
[Spring Boot] @NotNull @NotBlank @NotEmpty 설정했는데 null 이어도 동작할 때 (0) | 2024.07.18 |
---|---|
[Spring Boot] cannot deserialize from Object value (no delegate- or property-based Creator) 에러 해결 (0) | 2024.07.18 |
[Spring Boot] CORS 설정 (0) | 2024.07.17 |
[aws] 스프링 프로젝트 - mariadb rds ec2 서버 연결 java.sql.SQLNonTransientConnectionException 에러 해결 (0) | 2024.06.20 |
[Python] vs code에서 pyrebase 설치 오류 (0) | 2024.01.13 |