In this tutorial, you will learn how to read HTTP Request Header in the Rest Controller class of your Spring Boot application. To read HTTP Request Header in Spring Boot REST application, we use @RequestHeader annotation. @RequestHeader(value=”Accept”) String acceptHeader To learn how to test if HTTP Header is received, read the tutorial about Testing HTTP Header…
Read More Read HTTP Request Header in Spring Boot REST
In this Swagger tutorial, I am going to share with you how to add Contact and API information to your RESTful Web Service documentation created with Swagger. When adding Swagger to our RESTful Web Service, we usually create a new configuration Java Class which is then annotated with @Configuration annotation. Below is an example of…
Read More REST API Contact and ApiInfo with Swagger
If your project uses Spring Security and you have added Swagger/OpenAPI to it, there is a little additional configuration you need to do in order to make your /v3/api-docs and swagger-ui.html pages work. Enable Swagger URLs in Spring Security Project To enable Swagger URLs in a RESTful Web Services project built with Spring Boot and…
Read More Swagger/OpenAPI and Spring Security
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 deal with an infinite recursion problem or circular reference, which occurs when you try to return an Object with Bidirectional Relationships in the HTTP response body. Infinite Recursion Problem Let’s look at an example that will cause an Infinite Recursion problem in our RESTful Web Service when we…
Read More Infinite Recursion in Objects with Bidirectional Relationships
This tutorial will teach you how to create a JPA Native SQL Query to only select information from specific columns. You can find many more Spring Data JPA-related tutorials on this site. Some of the most popular tutorials are: One-to-One Mapping Hibernate/JPA Using Spring Boot and MySQL One-to-Many Mapping Hibernate/JPA Using Spring Boot and MySQL…
Read More Select Specific Columns with JPA Native Query
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
In this blog post, I am going to list commonly used POM.XML dependencies for building RESTful Web services with Spring Boot and Spring MVC. The list of below dependencies is not complete and will depend on the functionality you need your RESTful Web Services to support. But if you are building a simple REST API…
Read More Common POM.XML Dependencies for RESTful Web Services
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
I hope you do find these video lessons helpful. There are many more video lessons that I have recorded and packaged into a single video course. Please check out my video course below if you want to learn how to do Unit Testing and Integration Testing of Java applications.
Read More Testing RESTful Web Services
The list of below video tutorials is a Quick Start to learning How to Build RESTful Web Services with Spring Framework. Spring Framework is large and there is so much to learn about it. And although there are so many tutorials on the Internet I still felt it would be helpful to create a series…
Read More RESTful Web Services with Spring Framework. Video Tutorials
In this tutorial on Rest Assured, I am going to share with you how to create a test case which sends HTTP Get Request and includes two Query String Request Parameters. Let’s assume we need to test a RESTful Web Service Endpoint which returns a list of users. The URL to our RESTful Web Service…
Read More Rest Assured HTTP Request with Query Parameters
In this tutorial, you will learn how to validate the request body of an HTTP Post request sent to a RESTful Web Service endpoint built with Spring Boot. Request Body JSON Let’s say you have a RESTful Web Service endpoint that accepts HTTP post requests with the following JSON payload: { “firstName”: “Sergey”, “lastName”: “Kargopolov”,…
Read More Validate Request Body in RESTful Web Service
In this JUnit 5 and Rest Assured tutorial, I am going to share with you how to add JUnit 5 and Rest Assured support to your Spring Boot project. It will be more than that actually. This tutorial will cover: Add JUnit 5 and Rest Assured to Spring Boot Project, Create a new JUnit 5…
Read More Create a JUnit 5 Test Case with Rest Assured. Video Tutorial.
If your mobile or web app allows the user to register and have an account with your project then you also need to let users recover their lost or forgotten password. And in this video tutorial, I am going to share with you a few videos that will help you implement Password Reset functionality in your…
Read More Password Reset in REST API. Video tutorial.