Skip to content

Instantly share code, notes, and snippets.

@mmafrar
Created April 2, 2021 15:33
Show Gist options
  • Save mmafrar/cf942f5170dc9f0cda08bb8df13b8f4d to your computer and use it in GitHub Desktop.
Save mmafrar/cf942f5170dc9f0cda08bb8df13b8f4d to your computer and use it in GitHub Desktop.
Implementing Spring Boot MVC CRUD operations with JPA and JSP
package com.example.demo.model;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Setter
@Getter
@Entity
public class Contact {
@Id
@Column
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
@Column
private String name;
@Column
private String email;
@Column
private String country;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment