Skip to content

Instantly share code, notes, and snippets.

View vinchauhan's full-sized avatar

Vineet Chauhan vinchauhan

View GitHub Profile
@Entity
public class Project {
@Id
@GeneratedValue
private Long id;
private String name, description;
@OneToMany(mappedBy = "project")
@Entity
public class Developer {
@Id
@GeneratedValue
private Long id;
private String name;
private String skills;
public interface DeveloperRepository extends CrudRepository<Developer, Long> {
}
public interface ProjectRepository extends CrudRepository<Project, Long> {
}
<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>