Skip to content

Instantly share code, notes, and snippets.

View vinchauhan's full-sized avatar

Vineet Chauhan vinchauhan

View GitHub Profile
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
public interface ProjectRepository extends CrudRepository<Project, Long> {
}
public interface DeveloperRepository extends CrudRepository<Developer, Long> {
}
@Entity
public class Developer {
@Id
@GeneratedValue
private Long id;
private String name;
private String skills;
@Entity
public class Project {
@Id
@GeneratedValue
private Long id;
private String name, description;
@OneToMany(mappedBy = "project")