Running code after Spring Boot starts

Running code after Spring Boot starts is a common requirement for many applications. Spring Boot provides several ways to accomplish this, each with their own use cases and benefits. In…

Create a Custom Endpoint in Spring Boot Actuator

Spring boot actuator can be used to monitor and manage the spring boot application. The predefined spring boot actuator endpoints provide a ready-to-use monitoring and management solution for the application.…

How to get Thread Dump in Spring Boot

Thread dump in java provides all the state of currently existing threads in the java process. A thread dump is useful for troubleshooting because it shows the thread’s activity. A…

Spring Boot Actuator Not Working – Troubleshoot

Spring Boot Actuator is not working because the spring boot actuator dependency is incorrect or the actuator isn’t configured properly in the application.properties file. If the spring boot starter actuator…

How to use filters in spring boot

How to use filters in spring boot – Spring Boot allows to add a filter that intercepts and filters the request and response content. In the Spring Boot application, there…

Spring Boot @WebFilter not working

Spring boot @WebFilter annotation is used to configure web filters that intercept and filter requests and responses based on the request url in the spring boot application. The @WebFilter will…

How to add multiple filters in Spring Boot

Spring Boot allows to add multiple filters to an application so that you can do multiple filter operations in the request and response before sending it to the controller class.…

Spring Boot Logger

Spring boot logging framework uses commons Logging for all internal logging and application specific logs. Log frameworks like Java Util Logging, Log4J2, and Logback are supported by the Spring Boot…

Spring Boot use different database for test

Spring Boot makes use of the database specified in the application properties file. When the application is tested with test cases, the spring boot application uses the same database configuration…

How to test JPA Repository Spring Boot

The Spring Boot JPA Repository class allows you to retrieve data from a database table.The JPA Repository is used to test database CRUD operations like insert, update, delete, and select.…

How to Log Request and Response in Spring Boot

In the production environment, logging of request and response in a spring boot application is essential for understanding the request pattern. Spring Boot actuator allows you to trace the request…

Using OAuth 2 for Secure User Authentication

OAuth 2 is a widely used open-standard authorization framework that enables secure user authentication while allowing third-party applications to access user data without having to reveal the user’s password. In…