0Pricing
Java Academy · Lesson

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

  1. Design
  2. Implementation
  3. Tests & Extensions
  4. Final Recap & Review
← Back to Java Academy