title: save data to the database using spring boot
body: <p>when I post the data using the postman, the server replies with error code 500. the NetBeans terminal show:(java.sql.SQLIntegrityConstraintViolationException: Column 'email' cannot be null)</p>
  
  <p>bellow my entityclass:</p>
  
  <pre><code>@Entity(name="user")
  public class UserEntity  {
  
  @Id
  @GeneratedValue
   private long id;
  
  @Column(nullable = true)
  private String userId;
  
  @Column(nullable = true)
  private String FirstName;
  
  @Column(nullable = true)
  private String LastName;
  
  @Column(nullable = true)
  private String Email;
  
  @Column(nullable = true)
  private String Password;
  
  @Column(nullable = true)
  private String encryptedPassword;
  
  @Column()
  private String emailVerificationToken;
  
  @Column()
  private Boolean emailVerificationStatus=false;
  
  public long getId() {
      return id;
  }
  
  public void setId(long id) {
      this.id = id;
  }
  
  public String getUserId() {
      return userId;
  }
  
  public void setUserId(String userId) {
      this.userId = userId;
  }
  
  public String getFirstName() {
      return FirstName;
  }
  
  public void setFirstName(String FirstName) {
      this.FirstName = FirstName;
  }
  
  public String getLastName() {
      return LastName;
  }
  
  public void setLastName(String LastName) {
      this.LastName = LastName;
  }
  
  public String getEmail() {
      return Email;
  }
  
  public void setEmail(String Email) {
      this.Email = Email;
  }
  
  public String getPassword() {
      return Password;
  }
  
  public void setPassword(String Password) {
      this.Password = Password;
  }
  
  public String getEncryptedPassword() {
      return encryptedPassword;
  }
  
  public void setEncryptedPassword(String encryptedPassword) {
      this.encryptedPassword = encryptedPassword;
  }
  
  public String getEmailVerificationToken() {
      return emailVerificationToken;
  }
  
  public void setEmailVerificationToken(String emailVerificationToken) {
      this.emailVerificationToken = emailVerificationToken;
  }
  
  public Boolean getEmailVerificationStatus() {
      return emailVerificationStatus;
  }
  
  public void setEmailVerificationStatus(Boolean emailVerificationStatus) {
      this.emailVerificationStatus = emailVerificationStatus;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>bellow is my service implementation class:
      /*
      * To change this license header, choose License Headers in Project Properties.
      * To change this template file, choose Tools | Templates
      * and open the template in the editor.
      */
      package com.example.mobile.demo.impl;</p>
  
  <pre><code>import com.example.mobile.demo.DTo.UserDto;
  import com.example.mobile.demo.Entity.UserEntity;
  import com.example.mobile.demo.repository.UserRepository;
  import com.example.mobile.demo.service.UserService;
  import org.springframework.beans.BeanUtils;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;
  
  /**
  *
  * @author iphone
  */
  @Service
  public class UserserviceImpl implements UserService{
  
  @Autowired
  UserRepository userRepository;//it is in  the data layer so we need the repository to save in the database
  
  @Override
  public UserDto createuser(UserDto user) {
  
      UserEntity userentity=new UserEntity();
      BeanUtils.copyProperties(user, userentity);
      System.out.println("the properties has been copied to the entity");
      userentity.setEncryptedPassword("test");
      userentity.setUserId("testID"); 
      System.out.println("encryptef passwird and user id has been set");
  
  
      UserEntity stotedValue=userRepository.save(userentity);
  
  
  
  
      UserDto returnValue=new UserDto();
      BeanUtils.copyProperties(stotedValue, returnValue);
  
  
  
  
  
  
      return returnValue;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>my model class:</p>
  
  <pre><code>/*
  * To change this license header, choose License Headers in Project Properties.
  * To change this template file, choose Tools | Templates
  * and open the template in the editor.
  */
  package com.example.mobile.demo.modoel;
  
   /**
   *
   * @author iphone
   */
  public class Model {
  
   private String FirstName;
   private String LastName;
   private String Email;
   private String Password;
  
   public String getFirstName() {
      return FirstName;
   }
  
   public void setFistName(String FirstName) {
      this.FirstName = FirstName;
   }
  
   public String getLastName() {
      return LastName;
   }
  
   public void setLastName(String LastName) {
      this.LastName = LastName;
   }
  
   public String getEmail() {
      return Email;
   }
  
   public void setEmail(String Email) {
      this.Email = Email;
   }
  
   public String getPassword() {
      return Password;
   }
  
   public void setPassword(String password) {
       this.Password = password;
   }
  
  }
  </code></pre>
  
  <p>bellow is what Iam sending in the post request in the postman:</p>
  
  <pre><code>{
  "FirstName":"jack",
  "LastName":"testjack",
  "Password":"124",
  "Email":"emailTest@gmail.com"
  }
  </code></pre>