Implementation
Implement the REST API with entity, repository, service, and controller.
Intro
Implementation: we now write code for entity, repository, service, and controller.
Code: Entity
The Task entity maps to a database table.
import jakarta.persistence.*;@Entity
public class Task {
@Id @GeneratedValue
private Long id;
private String title;
private boolean done;
// getters/setters omitted
}
All lessons in this course
- Design
- Implementation
- Tests & Extensions
- Final Recap & Review