title: How can I GET object only by 1 field under @RequestBody annotation?
body: <p>I need an advice. I am not too good at Spring framework and I just want to ask you a simple question.</p>
  
  <p>I have a next POJO object on Server side:</p>
  
  <pre><code>@Entity
  @Table(name = "AutoRate")
  public class AutoService {
  
      public AutoService() {
      }
  
      @Id
      @GeneratedValue(generator = "increment")
      @GenericGenerator(name = "increment", strategy = "increment")
      private long id;
  
      @Column(name = "serviceName", nullable = false)
      private String serviceName;
  
      @Column(name = "imageURL", nullable = false)
      private String imageURL;
  
      @Column(name = "mapCoordinate", nullable = false)
      private String mapCoordinate;
  
      @Column(name = "websiteURL", nullable = false)
      private String websiteURL;
  
      @Column(name = "phoneNumber", nullable = false)
      private String phoneNumber;
  
      @JsonManagedReference
      @OneToMany(mappedBy = "autoService", fetch = FetchType.EAGER, cascade = CascadeType.PERSIST)
      private List&lt;Service&gt; services = new ArrayList&lt;Service&gt;();}
  </code></pre>
  
  <p>It contains all getters and setters; I just want to save space.</p>
  
  <p>Next: I want to get 1 object from database for client, and I want to do that using only <code>serviceName</code> variable in database.</p>
  
  <p>I have a next controller method:</p>
  
  <pre><code>@RequestMapping(value = "/getAutoService", method = RequestMethod.GET)
      @ResponseBody
      public AutoService getAutoService(@RequestBody String serviceName){
          AutoService autoService = dataBaseService.getByName(serviceName);
          return autoService;
      }
  </code></pre>
  
  <p>After call from client I get next error: </p>
  
  <pre><code>117899 [http-apr-8080-exec-1] WARN org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public com.webserverconfig.user.entity.AutoService com.webserverconfig.user.controller.ServiceController.getAutoService(com.webserverconfig.user.entity.AutoService)
  </code></pre>
  
  <p>I think that I am using <code>@RequestBody</code> annotation wrong.</p>
  
  <p>Can anybody give an advice ?</p>