Author: Sergey Kargopolov

I’m a software developer with a passion for teaching. I’ve written lots of articles for AppsDeveloperBlog.com and made plenty of video tutorials on my YouTube channel(https://youtube.com/@SergeyKargopolov). If you want to dive deeper, I’ve also got some courses on Udemy(https://www.udemy.com/user/sergeykargopolov/) you might like.

When I’m not coding, I love to travel. I also share my travel adventures over at TravelLocalCanada.com. Hope to see you around on one of these platforms!

Web: www.appsdeveloperblog.com

In this tutorial, you will learn how to use the @Autowired and @Qualifier annotations to inject a specific instance of a Bean. Sometimes you might have more than one implementation of an interface. If you do not explicitly specify which one you would like to inject, you will get a NoUniqueBeanDefinitionException when starting your application. Let’s…

Read More How to Use @Autowired and @Qualifier in Spring

In this short Spring Boot tutorial, you will learn how to pass command-line arguments to your Spring Boot application. Passing Command-Line Arguments To pass command line arguments to your Spring Boot app when running it with Maven use the -Dspring-boot.run.arguments. In the below code example, I will pass two command-line arguments: firstName and lastName. mvn spring-boot:run…

Read More Pass Command-Line Arguments to Spring Boot Application

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 short tutorial will teach you how to roll back a database change using @Transactional annotation in your RESTful Web Service built with Spring Boot and JPA. Rollback with @Transactional Annotation Sometimes if an error occurs in our RESTful Web Service, we want to roll back the changes made. For changes to be rolled back…

Read More Rollback Using @Transactional in Spring with JPA

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, I will share how to make the Spring Boot application display Hibernate SQL Queries. If you are learning about Hibernate, you might also be interested in the following tutorials: One-to-One Mapping Hibernate/JPA Using Spring Boot and MySQL One-to-Many Mapping Hibernate/JPA Using Spring Boot and MySQL Many-to-Many Relationship in Spring Boot Rest +JPA…

Read More Show Hibernate SQL Query in Spring Boot

This short Spring Data JPA tutorial will teach you how to write a Native UPDATE SQL query. Let’s assume you need to run the following SQL query: update users u set u.EMAIL_VERIFICATION_STATUS = ‘true’ where u.USER_ID = ‘5JwQBHd1mL73XEg8S2e2w4ITn9gOW4’ I assume you will not want to hardcode the values of EMAIL_VERIFICATION_STATUS and USER_ID into an SQL…

Read More Spring Data JPA Native UPDATE SQL Query

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