Getting 415 status code while testing a Post API with the message “message”: “Content type ‘text/plain;charset=UTF-8’ not supported”

While testing a REST controller(developed with SpringBoot) with Postman, getting 415 status code repeatedly.

Happening only with a specific post requests. other post requests are working fine. Have mimicked the working post controllers into failing ones but of no luck.

@RequestMapping(value="/addtheatre", method= RequestMethod.POST) public HttpStatus addTheatre(@RequestBody Theatre theatre ) { theatrerepository.save(theatre); return HttpStatus.OK;  } 

Theatre Entity is as follows:- package com.example.Model;

import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.stereotype.Component;  import javax.persistence.*; import javax.validation.constraints.NotNull; import java.sql.Time; import java.util.LinkedList; import java.util.List; import java.util.Map;   @Entity(name="Theatre") public class Theatre {      Theatre()     {}     @Id     @GeneratedValue(strategy= GenerationType.IDENTITY)     @Column(name="Id")     private long id;     @Column(name="name")     @NotNull     private String name;     @Column(name="address")     @NotNull     private String address;     @Column(name="city")     @NotNull     private String city;     @Column(name="is_active")     @NotNull     private Boolean is_active;     @Transient     private List<TheatreHall> halls;     @Transient     private Map <Movie,LinkedList<Time>> map;      public Boolean getIs_active() {         return is_active;     }      public void setIs_active(Boolean is_active) {         this.is_active = is_active;     }      public List<TheatreHall> getHalls() {         return halls;     }      public String getName() {         return name;     }      public void setName(String name) {         this.name = name;     }      public void setHalls(List<TheatreHall> halls) {         this.halls = halls;     }      public long getId() {         return id;     }      public void setId(long id) {         this.id = id;     }      public String getAddress() {         return address;     }      public void setAddress(String address) {         this.address = address;     }      public String getCity() {         return city;     }      public void setCity(String city) {         this.city = city;     }      public Map<Movie, LinkedList<Time>> getMap() {         return map;     }      public void setMap(Map<Movie, LinkedList<Time>> map) {         this.map = map;     }      @Override     public String toString() {         return "Theatre{" +                 "id=" + id +                 ", name='" + name + '\'' +                 ", address='" + address + '\'' +                 ", city='" + city + '\'' +                 ", is_active=" + is_active +                 ", halls=" + halls +                 ", map=" + map +                 '}';     }  } 

Postman testdata is as follows:-

Endpoint:-localhost:8080/addtheatre

Request:-

{    "name":"PVR Mall", "address":"Andheri", "city":"Mumbai", "is_active":"true" } 

Response:-

{     "timestamp": "2018-12-26T08:21:43.269+0000",     "status": 415,     "error": "Unsupported Media Type",     "message": "Content type 'application/json;charset=UTF-8' not supported",     "path": "/addtheatre" } 

Expecting OK status for this POST controller.