title: rest api return duplicate values in postman and spring boot h2
body: <p>I am new spring boot developer and i am trying to develope and rest api . when I do it ,I get and issues that my api return two duplicated response in postman .But i  haven't code anythiong to get duplicated valuese in my code . the one of duplicate values is  my model clase variable and athor one is table's attribute name .</p>
  <p>below response in postman</p>
  <p><a href="https://i.stack.imgur.com/CyC6J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CyC6J.png" alt="enter image description here" /></a></p>
  <p>model class</p>
  <pre><code>public class person {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY )
      private Long id;
  
  
  
      @Column(name = &quot;name&quot;)
   
      private      String Name ;
  
      @Column(name =&quot;surname&quot;)
   
      private   String Surname;
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getName() {
          return Name;
      }
  
      public void setName(String name) {
          Name = name;
      }
  
      public String getSurname() {
          return Surname;
      }
  
      public void setSurname(String surname) {
          Surname = surname;
      }
  
  }
  </code></pre>
  <p>repository</p>
  <pre><code>@Repository
  public interface personRepository extends JpaRepository&lt;person,Long&gt; {
  }
  </code></pre>
  <p>controller</p>
  <pre><code>@RestController
  @RequestMapping(&quot;/person&quot;)
  public class personController {
  
      @Autowired
      private personRepository repository;
  
      public personController(personRepository repository) {
          this.repository = repository;
      }
  
      @GetMapping(&quot;/view/list/person&quot;)
      private List&lt;person&gt; viewperson() {
          return repository.findAll();
      }
  
      @PostMapping(&quot;/insert/person&quot;)
      private person savePerson(@RequestBody person obj) {
  
          return repository.save(obj);
      }
  
      @DeleteMapping(&quot;/delete/{id}&quot;)
      private void delete(@PathVariable Long id) {
  
          repository.deleteById(id);
      }
  }
  </code></pre>
  <p>application.properties</p>
  <pre><code>spring.h2.console.enabled=true
  spring.datasource.url=jdbc:h2:mem:testdb
  spring.datasource.driverClassName=org.h2.Driver
  spring.datasource.username=sa
  spring.datasource.password=password
  spring.jpa.database-platform=org.hibernate.dialect.H2Dialec
  </code></pre>
  <p>t</p>