In this tutorial, you will learn how to call stored procedures in a Spring Boot RESTful API project that uses Spring Data JPA. Using a stored procedure to execute parts of the application logic in the database is a widely used approach in huge, data-heavy applications. A stored procedure is a group of predefined SQL…
Read More Calling a Stored Procedure in Spring Boot REST with JPA
In this short tutorial, you will learn how to read an ID Token in your Spring Boot Web Application @Controller class. The ID Token is a security token that is issued by the Identity Provider Server and it contains information about the currently authenticated user. For example, from the ID token, you can get the…
Read More Reading OAuth2 ID Token in Spring MVC
In this tutorial, I will share how to generate a self-signed certificate and enable HTTPS/SSL support in a Spring Boot application. You will also learn how to configure the RestTemplate HTTP client to use the same self-signed certificate to communicate with your Web Service over HTTPS. Let’s start by generating a self-signed certificate. Generate Self-Signed…
Read More Enable HTTPs/SSL in Spring Boot App
Below is the list of tutorials that should help you learn how to create a basic configuration and start with different Spring Cloud services. For step-by-step video lessons that teach from the very beginning how to create RESTful Microservices and make them work with Spring Cloud services, please check this page Spring Boot Microservices and…
Read More Microservices and Spring Cloud. Tutorials for Beginners.
In this tutorial, you will learn to create a Docker image for your Spring Cloud Config Server, which uses Symmetric or Asymmetric encryption to protect sensitive information. To learn how to create Spring Cloud Config that uses Symmetric encryption, read Spring Cloud Config – Symmetric Encryption and Decryption(Includes Video tutorial). And to learn how to create Spring…
Read More Docker Image for Spring Cloud Config Server
In this tutorial, you will learn how to use Asymmetric Encryption(RSA key pair) to encrypt sensitive information in configuration properties served by Spring Cloud Config Server. Asymmetric Encryption is a stronger encryption type than symmetric encryption(shared key), but it requires a little bit more effort to set up because we need to generate an encryption key. We…
Read More Spring Cloud Config – Asymmetric Encryption and Decryption
In this tutorial, you will learn how to encrypt and decrypt a property value that is being served by Spring Cloud Config Server. The Config Server can use a symmetric (shared) key or an asymmetric one (RSA key pair). In this tutorial, we will use the symmetric key. For Asymmetric Encryption, read this tutorial: Spring Cloud…
Read More Spring Cloud Config – Symmetric Encryption and Decryption
In this tutorial, you will learn how to add Swagger or an OpenAPI support to your Spring Boot project so that you can start documenting your REST API. To be able to follow this tutorial you will need to have your REST API Spring Boot project created. If you do not have one, here is…
Read More How to Add Swagger to a Spring Boot REST API Project
In this tutorial, you will learn how to run an SQL query in your project, which uses Spring Data JPA Query Methods. You will learn how to annotate the Spring Data JPA Query method so that you can use it to perform a custom SQL query to SELECT, UPDATE or DELETE a record from a…
Read More SQL Query with JPQL in a Spring Data JPA Project
When building RESTful Web Services we often need to add additional functionality to our project. For example, our application might need to work with a database or be able to cache data or work with LDAP or MongoDB. For our application be able to work with LDAP or MongoDB there are third-party libraries which we…
Read More A List of Spring Boot Starters
In this tutorial, we will create a Spring Boot application which demonstrates how we can add and use the H2 in-memory database in our application. You will learn how an in-memory database like H2 can be used to develop a Spring boot application without the overhead of doing DB configuration on your machine and without…
Read More Using H2 In-memory Database in Spring Boot
For a complete step-by-step video course check this page: RESTful Web Services, Java, Spring Boot, Spring MVC, and JPA To learn how to build RESTful Microservices with Spring Cloud by watching step-by-step video lessons, please check this page: Spring Boot Microservices and Spring Cloud. What is Spring Framework? Introduction to Spring Boot, Create a Simple Web Service…
Read More RESTful Web Services with Spring Boot REST
In this blog post, I will share how to create a very simple RESTful Spring Boot Web Service that uses Spring Data JPA to save information to a database. Our Web Service will accept HTTP Post requests with user details and then save these user details into MySQL Database using Spring Data JPA CrudRepository. For code…
Read More Spring Boot REST and JPA – Save to a Database
In this blog post, I am going to share with you how to configure Spring Data JPA in a Jersey 2 Container Deployable Web App. Spring Data JPA makes it much easier and more convenient to persist and read data from the database and when I needed to tie together Spring Data JPA and Jersey 2 Web…
Read More Configure Spring Data JPA in Jersey 2 JAX-RS App
Create a Servlet Container deployable Jersey web application Create new Jersey web application using Maven. The project created with the below jersey-quickstart-webapp archetype can be built and deployed to a servlet container like for example Apache Tomcat. mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \ -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.26 POM.XML Dependency to Support JSON To support JSON in your Jersey Web App add…
Read More RESTful Web Services with Jersey and Spring Data JPA – Cheat Sheet