Spring Basic
Registering beans in Spring container with BeanRegistrar
Since version 7, Spring has introduced another way for us to register one or more beans at the same time in the Spring container using the implementation of the BeanRegistrar interface. How exactly? Let’s find out in this tutorial! I will create a Maven project:… Read More
API Versioning using request headers with Spring framework
API Versioning is a new feature of Spring supported since version 7, which helps us easily add a version for RESTful APIs in the request header, in the path parameter, in the media type parameter, in the query parameter, or a custom version resolver. In… Read More
@Conditional annotation in Spring
When working with applications that use the Spring framework, you will need to know how to declare and use Beans in the Spring container. Normally, we just need to declare Bean for a certain class and Spring will automatically create Bean for that class in… Read More
Transaction management with @EnableTransactionManagement in Spring application
In the tutorial JDBC transaction management in Spring, I showed you how to configure transaction management using an XML file. We can also use Java code to do this with the @EnableTransactionManagement annotation. How is it in detail? We will find out together in this… Read More
Auto component scan in Spring using @ComponentScan annotation
In the previous post, I showed you how to auto component scan using the configuration in the XML file. In this tutorial, I show you how to do this with Java code using the @ComponentScan annotation. First, I will create a new Maven project as… Read More
Initialize bean in Spring container using @Configuration annotation
You already know how to initialize the bean in the Spring container using the XML file in the previous tutorial. In addition to this, Spring also supports us to initialize the bean using the @Configuration annotation in the Java code. Let’s see how to initialize… Read More
Using @Qualifier annotation in Spring
In the tutorial on Bean autowiring in Spring framework, you know in the case of byType autowire, we cannot declare more than one bean of the same dependency in Spring’s container. Because in this case, Spring does not know what bean to use for autowire.… Read More
Talking more about AutowiredAnnotationBeanPostProcessor
In the previous tutorial on the bean autowiring using the @Autowired annotation, I mentioned that the AutowiredAnnotationBeanPostProcessor object is used to dynamically place objects that depend on the dependent object. Perhaps some of you are wondering how this object can do that, right? Me too,… Read More
Bean autowiring using @Autowired annotation
In my tutorial Bean autowiring in Spring framework, I showed to you all three ways to automatically put a dependency object on a dependent object without having to use the ref or list attributes. In this tutorial, I will introduce you to another way of… Read More

