mehmetozanguven
  • Home
  • About Me
  • Top Categories
    • Container
    • Apache Flink
    • JPA
    • Spring Boot
  • Popular tags
    • How to series
    • Spring Security
  • Pages
    • Tags
    • Category

Showing posts from spring-boot

  • Home
  • /   Categories
  • /   Spring boot
  • 20 Mar, 2025
    • spring-boot

Implementation of Outbox Pattern in Spring Boot

In distributed systems, we generally face the challenge of keeping our databases and external systems in sync. For instance when we create an order we …

  • 13 Nov, 2024
    • jpa
    • spring-boot

How to use Criteria & Metamodel API with Spring Boot to create dynamic queries

Sometimes you may need to create your sql queries on runtime with some specification given by your client. In these cases, you may create many JPQLs …

  • 21 Nov, 2023
    • spring-boot

Capture long running method execution in Spring Boot using annotation

It is crucial to capture long running method execution in your application (whether it is an API or traditional mvc application). You should also …

  • 20 Nov, 2023
    • spring-boot

Graceful Shutdown in Spring Boot and multithread environment

Spring provides reliable shutdown of the application using feature called Graceful Shutdown. With Graceful shutdown feature we can close the …

  • 06 Oct, 2023
    • java
    • spring-boot

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 …

  • 28 Sep, 2023
    • java
    • spring-boot

@RequestHeader annotation in 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 …

How to disable async operation for specific test cases in Spring Boot
  • 30 Aug, 2023
    • java
    • spring-boot
    • testing

How to disable async operation for specific test cases in Spring Boot

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 …

How to change running port in spring boot?
  • 07 Aug, 2023
    • java
    • spring-boot

How to change running port in spring boot?

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 …

What spring boot version am I using?
  • 07 Aug, 2023
    • java
    • spring-boot

What spring boot version am I using?

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 …

Integrate Google reCAPTCHA v3 into Spring Boot and Vue 3 (Nuxt 3)
  • 25 May, 2023
    • java
    • spring-boot
    • vue-js

Integrate Google reCAPTCHA v3 into Spring Boot and Vue 3 (Nuxt 3)

Integrating Google reCAPTCHA v3 with spring boot applications can greatly enhance security and protect against malicious activities, such as spam and …

How to resolve Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported in your Spring Boot project
  • 23 May, 2023
    • how-to-series

How to resolve Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported in your Spring Boot project

Most probably you have encounter the following error, while waiting response from other services(for instance it could be payment response from the …

Creating base class (abstract entity class) for all entities in your Spring Boot project
  • 16 May, 2023
    • jpa
    • hibernate

Creating base class (abstract entity class) for all entities in your Spring Boot project

As developers, we often find ourselves faced with the challenge of managing multiple entities that share common attributes and behavior. By leveraging …

Modern Spring Boot v3 with Thymeleaf, TailwindCSS and AlpineJS
  • 12 Dec, 2022
    • java
    • spring-boot

Modern Spring Boot v3 with Thymeleaf, TailwindCSS and AlpineJS

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 …

How to paginate and sort for join queries in Spring Boot
  • 06 Aug, 2022
    • java
    • spring-boot

How to paginate and sort for join queries in Spring Boot

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 …

How to use cache in Spring Boot  applications without annotation(s)
  • 16 Jan, 2022
    • java
    • spring-boot

How to use cache in Spring Boot applications without annotation(s)

Almost every blog(s) on the Internet for caching operation in the Spring Boot are using @Cacheable, @CacheEvit, @CachePut vs… In this blog we …

Running Spring Boot Application with Podman
  • 16 Dec, 2021
    • container
    • podman
    • spring-boot

Running Spring Boot Application with Podman

To run spring boot application in a container. We should do the following steps: Create a jar package with maven or gradle (mvn clean install or mvn …

How to read properties file only once in the Spring Boot application
  • 26 Nov, 2021
    • java
    • spring-boot

How to read properties file only once in the Spring Boot application

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 …

How to create sitemap.xml controller in Spring Boot
  • 05 Nov, 2021
    • java
    • spring-boot

How to create sitemap.xml controller in Spring Boot

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 …

How to create robots.txt controller in Spring Boot
  • 01 Nov, 2021
    • java
    • spring-boot

How to create robots.txt controller in Spring Boot

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 …

How to catch all exceptions in Spring Boot
  • 30 Oct, 2021
    • java
    • spring-boot

How to catch all exceptions in Spring Boot

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 …

Spring Boot OAuth2, Postgresql, Thymeleaf with Form based Authentication
  • 25 Oct, 2021
    • java
    • spring-boot

Spring Boot OAuth2, Postgresql, Thymeleaf with Form based Authentication

Let’s implement oauth2 practical implementation with Spring Boot using PostgreSQL and Thymeleaf. In this application: We will use PostgreSQL to …

Spring Boot OAuht2 Reason for /oauth2/authorization/{id}
  • 18 Sep, 2021
    • java
    • spring-boot

Spring Boot OAuht2 Reason for /oauth2/authorization/{id}

Do you know the reason why redirect URL should be http://localhost:8080/login/oauth2/code/google when we setup Authorization Server in the …

Spring Boot OAuth 2 Implementation with Thymeleaf
  • 18 Sep, 2021
    • java
    • spring-boot

Spring Boot OAuth 2 Implementation with Thymeleaf

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) …

Spring Boot with OAuth2 - Theory
  • 15 Sep, 2021
    • java
    • spring-boot

Spring Boot with OAuth2 - Theory

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 …

Spring Boot JWT Setup with Frontend (VueJs)
  • 12 Jul, 2021
    • java
    • spring-boot

Spring Boot JWT Setup with Frontend (VueJs)

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 …

Find Client's Location In Spring Boot with IP2Location and Update via Scheduling
  • 28 May, 2021
    • java
    • spring-boot

Find Client's Location In Spring Boot with IP2Location and Update via Scheduling

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 …

Spring Security -- 9) Spring Security CORS Setup
  • 21 May, 2021
    • java
    • spring-boot
    • spring-security

Spring Security -- 9) Spring Security CORS Setup

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 …

Spring Security -- 8) Spring Security CSRF Attack Simulation & CSRF Setup and Customization (Cross-Site Request Forgery)
  • 16 May, 2021
    • java
    • spring-boot
    • spring-security

Spring Security -- 8) Spring Security CSRF Attack Simulation & CSRF Setup and Customization (Cross-Site Request Forgery)

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 …

How to resolve -- Invalid Cors Request In Spring Boot
  • 13 May, 2021
    • how-to-series
    • spring-boot

How to resolve -- Invalid Cors Request In Spring Boot

Recently I have encountered this error. And I can not send any request even I have setup corsConfiguration.setAllowedOrigins("*") . Response …

Spring Security -- 7) Security Context and Security Context Holder
  • 11 May, 2021
    • java
    • spring-boot
    • spring-security

Spring Security -- 7) Security Context and Security Context Holder

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 …

Spring Security -- 6) Multiple Authentication Filters && Providers
  • 06 Jan, 2021
    • java
    • spring-boot
    • spring-security

Spring Security -- 6) Multiple Authentication Filters && Providers

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 …

Spring Security -- 5) Filter Chain, Custom filter and Authentication
  • 30 Dec, 2020
    • java
    • spring-boot
    • spring-security

Spring Security -- 5) Filter Chain, Custom filter and Authentication

Let’s look at the Filter Chain, more specifically AuthenticationFilter in the Spring Security. And also I am going to implement custom filter. …

Spring Security -- 4) Implementing Custom Authentication Provider
  • 30 Dec, 2020
    • java
    • spring-boot
    • spring-security

Spring Security -- 4) Implementing Custom Authentication Provider

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 …

Spring Security -- 3) UserDetailsManager, JdbcUserDetailsManager and BCryptPasswordEncoder
  • 29 Dec, 2020
    • java
    • spring-boot
    • spring-security

Spring Security -- 3) UserDetailsManager, JdbcUserDetailsManager and BCryptPasswordEncoder

In this post, let’s look at the what UserDetailsManager is, differences between UserDetailsService. And also I am going to implement a project …

Spring Security -- 2) UserDetailsService
  • 29 Dec, 2020
    • java
    • spring-boot
    • spring-security

Spring Security -- 2) UserDetailsService

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 …

Spring Security -- 1) Basic Concepts
  • 29 Dec, 2020
    • java
    • spring-boot
    • spring-security

Spring Security -- 1) Basic Concepts

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 …

Aspect Oriented Programming(AOP) with Spring Boot Example - 2
  • 17 Nov, 2020
    • java
    • spring-boot

Aspect Oriented Programming(AOP) with Spring Boot Example - 2

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 …

Aspect Oriented Programming(AOP) with Spring Boot - 1
  • 13 Nov, 2020
    • java
    • spring-boot

Aspect Oriented Programming(AOP) with Spring Boot - 1

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 …

  • About Me
  • Contact Us
  • Privacy
  • Terms & Conditions

mehmetozanguven