title: Spring-data-mongodb generic type
body: <p>Let's say we have a simple document type defined in mongodb：</p>
  
  <pre><code>{
    _id : OjbectId(xxx),
    value : A
  }
  </code></pre>
  
  <p>But the value <code>A</code> here could be float, integer, boolean or string. How can I map it into a java entity?</p>
  
  <p>Here's a template which only mapped <code>_id</code>:</p>
  
  <pre><code>@Document(collection = "my_document")
  public class MyDocument {
    @Id
    private String id;
  
    public String getId() {
      return this.id;
    }
  
    public void setId(String id) {
      this.id = id;
    }
  }
  </code></pre>
  
  <p>Thanks.</p>