Use Junit 5 in Spring Boot version 2.1.x
Some of the older versions of Spring boot supports Junit 4 (with Junit 5 dependencies as well). If you want to use Junit 5 in in your spring boot …
Some of the older versions of Spring boot supports Junit 4 (with Junit 5 dependencies as well). If you want to use Junit 5 in in your spring boot …
@RequestHeader annotation is used to bind a request header to a method argument in a controller. In other words, it allows us to read http headers in …
I was facing a challenge with running test cases that include async methods in my Spring Boot application. The test cases failed because the async …
There are 3 ways to change default running port in spring boot application: By default, the embedded server starts on port 8080. 1- Use Property files …
It is so easy to learn your spring boot version. To learn that you have to look at the following files (according to project tool you are using): If …
Integrating Google reCAPTCHA v3 with spring boot applications can greatly enhance security and protect against malicious activities, such as spam and …
Let’s assume that you have the following message template in which clients send the text with the correct parameter. Here is the template: …
Sometimes your entity might need store nested data structures such as Map<String, Map<String, String> or list of list etc.. If you want to …
In this tutorial, we will integrate Spring MVC with gulp and webpack. As you know creating Spring MVC project with Thymelaef project is so easy. But …
Let’s say you have two entities which has many-to-one relationship and you want to paginate your query on the parent side with additional colums …
You want to add & use simple cache in your application via hash map, but also you want your cache to remove automatically expired …
Like people, computers can multitask. They can be working on several different tasks at the same time. A computer that has just a single central …
Almost every blog(s) on the Internet for caching operation in the Spring Boot are using @Cacheable, @CacheEvit, @CachePut vs… In this blog we …
Do you want to know how to read specific properties file according to the environment variable in Spring boot? Let’s explore how to read …
Even we have Java 17 version right now, industries still are using Java 8 & 11 even old ones using Java 6. Also many of these industries are using …
Let’s quickly learn how to generate sitemap.xml endpoint for your spring boot project. We will create a sitemap controller to handle sitemap.xml …
Let’s learn how to create robots.txt file for your spring boot or spring mvc project. Having robots.txt file tells search engine crawlers, such …
In this quick tutorial, let’s learn how to catch all exception(s) in Spring Boot. And most probably you want to return customized exception when …
Let’s implement oauth2 practical implementation with Spring Boot using PostgreSQL and Thymeleaf. In this application: We will use PostgreSQL to …
Do you know the reason why redirect URL should be http://localhost:8080/login/oauth2/code/google when we setup Authorization Server in the …
In this article, we will implement a basic single sign on application using Spring boot. We will use Thymeleaf for html pages A single sign-on (SSO) …
In this post, we are going to learn what the oAuth2 is, how to use OAuth2 in Spring boot. We will start with why do we need a OAuth2, we will look at …
In this article, we are going to learn lifecycle events in the JPA. As of the most application we will have date_created and last_modified column to …
In this article, we will learn what is the JPQL(The Java Persistence Query Language) and how to use it. What is the JPQL The Java Persistence query …
In this article, we are going to discuss what is the entity manager in the JPA and also learn the basic operations in the entity manager How to Obtain …
In this article, we are going to look how to represent the inheritance relationship in the JPA and how to use @MapperSuperclass annotation Github Link …
In this article, we are going to learn how to create relationship using @Embeddable & @Embedded object . @AssociativeOverride is used to override …
In this post, we are going to learn how to create many-to-many relationship in JPA. Github Link If you only need to see the code, here is the github …
In the OneToMany setup, Many sides must have the foreign key and it is the owner of the relatonship Github Link If you only need to see the code, …
In this article, we are going to learn how to construct a one-to-one relationship between entities in the JPA and when to use Cascade operation Github …
In this article, we are going to find out how to create composite keys in JPA. Composite key is the key which composed of multiple columns. Github …
In this post, we are going to learn when and how to use embaddable object in Java and JPA. Github Link If you only need to see the code, here is the …
In this post, we are going to learn @Enumarated and @Temporal annotations, how to store enums as ordinal and string and when to store enum types to …
In this post, we are going to find out “what are the options to provide automatic Id generation instead of setting manually”. We will look …
In this series, we are going to learn the JPA fundamentals and we are going to use one of its implementation Hibernate. Before diving into the series, …
In this post, we are going to setup spring boot rest project with using JWT. we will also integrate the our spring boot application with the frontend …
In this tutorial, we are going to find location of your clients using spring boot and IP2Location and also we will look at how to update IP2Location …
In this post, let’s find out what is the CORS policy, how to implement in the Spring Boot and Spring Security, finally how to resolve most …
In this post, we are going to learn what CSRF(or XSRF) attack is, how to simulate csrf attack in spring and how to setup csrf protection in spring …
In this post, let’s find out what the Security Context is I am going to use the project that I have implemented in the previous post. Here is …
In this post, let’s implement two steps authentication mechanism. This will be similar to JWT authentication but instead of JWT I will use my …
Let’s look at the Filter Chain, more specifically AuthenticationFilter in the Spring Security. And also I am going to implement custom filter. …
In this post, I am going to answer to this question “what is the Authentication Provider” and I am going to implement a project includes …
In this post, let’s look at the what UserDetailsManager is, differences between UserDetailsService. And also I am going to implement a project …
In this post, I am going to use real database to check the user against the request(s). Github Link If you only need to see the code, here is the …
In these short series , I am going to dive into what Spring Security is, how Spring Security works. Most of the example application would be for web …
This is the second post for a short series of aspect oriented programming with the spring boot. In this post, I am going to implement a simple project …
In this post, we are going to look at what is AOP and how your spring application matches with AOP concepts using Spring AOP module. After that we are …
In this post, we are going to learn Regex expression in one blog Let’s start with defining what is Regex or Regex expression. What is Regex? …