Skip to content

Instantly share code, notes, and snippets.

@SDiamante13
Created January 26, 2019 03:57
Show Gist options
  • Select an option

  • Save SDiamante13/df993fe4b206bd6dd79796eecd1d5423 to your computer and use it in GitHub Desktop.

Select an option

Save SDiamante13/df993fe4b206bd6dd79796eecd1d5423 to your computer and use it in GitHub Desktop.
Employee Entity
package com.diamante.springbootmongodb.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "employees")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee {
@Id
private Integer id;
private String name;
private String role;
private double salary;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment