Search⌘ K
AI Features

REST APIs for Repository Resources

Explore how to quickly create customizable hypermedia-driven REST APIs with Spring Data REST by leveraging repository interfaces annotated with @RepositoryRestResource. Understand how to expose resources such as Todo and TodoType via REST endpoints that include navigable links. Gain practical skills to build RESTful services efficiently without manually defining controllers.

Spring Data Rest

So far, we’ve learned to create REST APIs by defining REST controllers and integrating persistence support by using the Spring Data JPA. Next, we’ll explore the Spring Data REST framework which provides quick and handy ways to build ...

Diff
plugins {
id 'org.springframework.boot' version '2.6.2'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}
group = 'io.educative'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
}
...