REST API with Spring Boot, Hibernate, and JPA

In the previous chapter, we saw how to create a static RESTful API. We will now learn how to manipulate database records as response to an API request. I've used MySQL as a database in this project.

We will use JPA in this project. You can start a new project and add JPA as one of the dependencies. Alternatively, you can add this to your Gradle dependencies list:

    compile('org.springframework.boot:spring-boot-starter-data-jpa') 
Note: You don't need to put version and artifacts here, it is automatically managed by a Spring Gradle plugin and Spring Boot.

Now, as you added the dependency, you have to add application.properties. Go to resources and add a file named application.properties with the ...

Get Reactive Programming in Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.