Why Logging?

Logging information usually refers to the logging of our application activity that helps in analyzing the runtime behavior of the application especially when our application encounters unexpected behaviors, errors, or tracking steps executed by application flow. As much as you provide logging information. It will be easy to analyze any issues and bugs in the… Read More »

How to Send Mail Spring Boot Example

In this post, We will learn How to Send Mail Spring Boot Example using a demo Project. Spring Boot Starter email is a generally thin wrapper over Jakarta Mail API that makes very easy integration with emailing services into Spring-based applications. so here we will be using Spring starter email dependency in pom.xml to work with… Read More »

Spring Boot Actuator

In this post, We will talk and learn about Spring Boot Actuator Spring Boot provides various features to monitor and manage our application when the project is pushed into production. We can opt to manage and monitor our application by using HTTP endpoints. Auditing, health check, and metrics gathering can also be checked using Actuator… Read More »

What is Spring boot ?

In this post, We will talk about What is Spring boot? Spring Boot is built on top of the traditional spring framework and it provides an easier way to use all the features of the spring framework. Spring Boot provides autoconfigure feature for all Spring beans. We just need to use proper configuration properties files to… Read More »

Spring vs Spring boot

In this post, We will talk about the differences between the standard Spring frameworks and Spring Boot. What is Spring? Spring is an open-source(free) very lightweight java framework that allows us to build simple/complex, reliable, and scalable enterprise-level applications. This framework mainly helps us to manage our business objects in a loosely coupled manner using dependency… Read More »

How to Configure Multiple Data Sources in a Spring Boot?

In this post, We will learn How to Configure Multiple Data Sources in a Spring Boot using a demo project? There are many situations where we need to read/write data from multiple databases and while using Spring data JPA sometimes it becomes challenging to configure to get connections with multiple databases in a single application. Hence,… Read More »

Private Methods in Java 9 Interfaces

Java 9 Private Interface Methods: From Java 9 onwards, we can create private non-static/static methods inside an interface. The interface allows us to define private methods that help to share common code between non-abstract/default methods. Prior to Java 9, When you create private methods inside an interface then you will get a compile-time error. Private methods in interfaces have… Read More »

Java 9 SafeVarargs Annotation

@SafeVarargs annotation was introduced in Java7 and can only be applied on: Final methods Static methods Constructors This annotation is used to ensure that the method/Constructors does not perform unsafe operations on its varargs parameters. From Java 9 onwards, it can also be used with private instance methods. SafeVarargsTest.java

If you run SafeVarargsTest.java as Java Application… Read More »

Java 9 Try with Resource Enhancement

Java introduced try-with-resources feature in Java 7 that helps to close resources automatically after being used. In other words, we can say that we don’t need to close resources (file, connection etc) explicitly, try-with-resource close that automatically by using the AutoClosable interface. If you look in Java 7 then you will find that try-with-resources has a limitation… Read More »

Java 9 Collection Factory Methods Example

In this post, We will talk and learn about Java 9 Collection Factory Methods Example with a demo project Java 9 has added simple ways to create immutable Collections without null values by providing a set of <Collection>.of methods. The created collection should not have null values and should not be modified later else it… Read More »