

For example, in this tutorial, you’ll be using Postgres, but later if you decided you’d rather use MySQL, all you’d have to do is change out some dependencies. No need to actually write persistence or retrieval methods! Another great benefit is that you can change the underlying database implementation transparently without having to change any code. As you’ll see, it makes persisting your Java classes as simple as adding some annotations and creating a simple repository interface. Spring Data JPA is a wrapper around JPA providers such as Hibernate. It describes an abstraction layer between Java classes and a relational database. JPA is the Java Persistence API, a specification for managing relational databases using Java. If this sounds complicated - don’t worry! It’s not.īefore we dig in, let’s cover some background:Ī resource server is a programmatic access point for your server’s functions and data (basically the same as an API server and/or possibly REST server). On top of that, you’re going to implement a group-based authentication and authorization layer using OAuth 2.0. In this post, you’re going to build a resource server using Spring Boot and Spring Data JPA. When coupled with Okta, you get professionally maintained OAuth and JWT technologies easily integrated into Spring Boot using Spring Security.

Within the Java ecosystem, Spring makes building secure resource servers for your data simple. Java is a great language with decades of history in professional, enterprise development, and is a great choice for any application’s server stack.
Postgres app create role update#
Every non-trivial application needs a way to save and update data: a resource server that is accessible via HTTP.
