In the previous article, we discussed different spring core annotations. Here we are discussing the main stereotype annotations in Spring.

Photo by Markus Spiske on Unsplash

The Spring Framework provides you with some special annotations. These annotations are used to create Spring beans automatically in the application context. The main stereotype annotation is @Component.

There are some Stereotype meta-annotations which is derived from @Component those are

@Service: Used to create Spring beans at the Service layer,

@Repository: Which is used to create Spring beans for the repositories at the DAO layer, and

@Controller: Which is used to create Spring beans at the controller layer.

The spring supports a large set of annotations for handling different situations. Over this article, we are exploring the annotations in the spring core framework.

Photo by Victoria Strukovskaya on Unsplash

Over this article, we are discussing the spring core annotations such as @Autowire, @Qualifier, @Configuration, @Bean, @ComponentScan, @Lazy, and @Value. We will cover all these annotations with examples.


From Spring 2.5, the framework introduced annotations-driven Dependency Injection. The main annotation that comes as part of this feature is @Autowired. It allows Spring to resolve and inject collaborating beans into our bean.

The @Autowired annotation is the most used way to inject the dependencies in Spring…

Over this article, we are discussing 14 important commands on git. In your development workspace, you can do most of the git operations by using these 14 commands.

Photo by Pankaj Patel on Unsplash

git clone

It is used to get a copy of an existing Git repository. The “clone” command downloads an existing Git repository to your local computer.

Typically, the “original” repository is located on a remote server, (remote repo service like GitHub, Bitbucket, or GitLab). That remote repository’s URL is then later referred to as the “origin”.

The usage of the git clone command is.

git clone <repository_url>

git init

This command creates an empty Git repository…

In the previous article, we saw the basics of spring security. Now over this article we can explore how to do JWT authentication using spring security.

Photo by Georg Bommeli on Unsplash

Hope you know the basics of Spring Security. If you don't, please go back to my article about basic spring security and get an understanding of it.

In the previous article, the examples are described with java basic authentication. But there are some security problems with the java basic authentication.

What is Basic Authentication?

Each time a request is sent to the server, it would need to be authenticated so that the application can ensure that the request…

If you are using spring security first time and you feel like spring security is a weird thing. Actually, that is not because of spring security it's because of your knowledge about spring security. Over this article, we are discussing the basic configuration of spring security in very depth.

Photo by Franck on Unsplash

What is Spring Security?

Spring Security is a framework that enables a programmer to impose security restrictions to Spring-framework–based Web applications through JEE components. Also, it is a library that can be used, extended to customize as per the programmer’s needs. The greatest advantage of this framework is that it is powerful yet highly customizable…

Over this article, we will explore what is the volatile keyword and frequently asked questions about the volatile keyword.

Photo by Bruno Nascimento on Unsplash

Before getting into this article hope you know about how a CPU works. If you not please go back and read my article about CPU working and get an understanding of it.

What is volatile keyword?

The Java volatile keyword guarantees the variables are updated across different threads.

In a multithreaded environment how a normal variable work is, each thread may copy variables from the main memory into a CPU cache while working on them. It is for performance improvement. Most modern processors contain more…

Over this article, we are discussing how the CPU responds to each and every Java operation. How the CPU process different operations in an optimized way. In this article, you will get a good clarity about the terms such as CPU, CPU cache, L1, L2 and L3 caches and how it helps to perform CPU operations.

Photo by Hoover Tung on Unsplash

Before getting into this article, hope you know about Java benchmarking tool JMH. Over this article, we are doing some Java performance experiments using JMH. If you are not, then just go back to my article about JMH and get an understanding about it.

Now the finalize method is deprecated from Java. Over this article let's explore why java deprecated the finalize method, what are the alternative solution they introduced instead of finalizing method, What are its advantages …etc

Photo by Jasmin Sessler on Unsplash

The Object class has a finalize() method, which is automatically called by GC before it attempts to remove the object from the heap. In Java 9, the finalize() method has been deprecated. The finalization mechanism is inherently problematic and can lead to performance issues, deadlocks, and hangs. The java.lang.ref.Cleaner and java.lang.ref.PhantomReference provide more flexible and efficient ways to release resources when an object becomes unreachable.

What is the use of finalize() method?

Here over this article let's explore the keywords static and final. It is able to create methods or variables using these keywords. We will discuss all the advantages and disadvantages of these keywords.

Photo by David Emrich on Unsplash

What is a static keyword?

In Java, if we want to access class members, we must first create an instance of the class then we can call the class members by using the instance variable. But there will be situations where we want to access class members without creating any variables.

In such situations, we can use the static keyword in Java. If we want to access class members without creating an…

Object class is present in java.lang package. Every class in Java is directly or indirectly derived from the Object class. Over this article lets explore the Java Object class in detail.

Photo by Guillaume de Germain on Unsplash

Why the Object class is so important?

Every class in Java is directly or indirectly derived from the Object class. If a class does not extend any other class then it is a direct child class of Object and if extends another class then it is indirectly derived. Therefore the Object class methods are available to all Java classes.

public class User {}

If you declare a class like above then internally java extends that class…

Anish Antony

Fullstack Developer | Blogger | Experience on Java, Python, React, Angular, Golang |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store