no suitable HttpMessageConverter found for response type

前端 未结 10 1782
深忆病人
深忆病人 2020-11-30 02:33

Using spring, with this code :

List> messageConverters = restTemplate.getMessageConverters();
for(HttpMessageConverter ht         


        
10条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 03:06

    If you are using Spring Boot, you might want to make sure you have the Jackson dependency in your classpath. You can do this manually via:

        
            com.fasterxml.jackson.core
            jackson-annotations
        
        
            com.fasterxml.jackson.core
            jackson-core
        
        
            com.fasterxml.jackson.core
            jackson-databind
        
    

    Or you can use the web starter:

    
      org.springframework.boot
      spring-boot-starter-web
    
    

提交回复
热议问题