Troubleshooting

[스프링] no suitable HttpMessageConverter found for request type

한상규 2022. 3. 28. 11:06

상황

vue에서 spring api에 요청을 보내는데 "no suitable HttpMessageConverter found for request type" 가 발생하였다.

 

문제점

1. json을 java dto로 매핑하지 못하고 있었다.

 

해결

1. json 필드명과 dto 필드명을 일치시켰다.

-> 하지만 문제는 계속되었다.

2. dto에 getter, setter를 만들어 주었다. 

-> 해결!