Skip to content

Instantly share code, notes, and snippets.

@bijay-shrestha
Last active June 17, 2019 21:42
Show Gist options
  • Save bijay-shrestha/9fdfe7d90a55d2ebb75c0b8f865f4647 to your computer and use it in GitHub Desktop.
Save bijay-shrestha/9fdfe7d90a55d2ebb75c0b8f865f4647 to your computer and use it in GitHub Desktop.

no suitable HttpMessageConverter found

org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for 
response type [class com.example.demo.model.Car] and content type [text/html;charset=utf-8]

Solution

Add

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

or

  <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
    </dependency>

in your pom.xml file.

Stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment