From the course: Spring Boot 3 Essential Training

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Building Spring REST repositories

Building Spring REST repositories - Spring Boot Tutorial

From the course: Spring Boot 3 Essential Training

Building Spring REST repositories

- [Instructor] There's a construct from Spring Data that we haven't discussed in either the web services or the data conversations that we've had. But if you are writing a lot of simple data web services, especially those targeting a front end application, they can be a really quick way to operate. And that is using Spring Data REST repositories. We aren't going to go too deep into them. Instead I just want to show them because they are worth seeing and how they operate. Open up the POM file, and we're going to add yet another dependency. This time we are going to add spring-boot-starter-data-rest. From org.springframework.boot. Go ahead and run Maven and allow that to get loaded onto the class path. Now, we want to open up src, main, resources, and go to our application.properties file. We need to put a property in here and that is going to be spring.data.rest.base-path. And this is the base URL that we want to expose these at. So we are going to use our api/rest path. So we've been…

Contents