Autowiring in spring

Autowiring is an easy way of doing dependency injection in Spring. Let’s see how we do dependency injection without autowiring Create Person.java package com.kb.autowiring1;   public class Person {         Car car;     public Car getCar() {         return car;     }     public void setCar(Car […]

Share this article on

context:component- scan

context:component- scan element helps to identify the java classes which can be registered as a spring beans. Let us understand how context:component- scan works ? step 1 All the java classes that need to register as a spring bean must be annotated with at least one of the below annotation a) @Component b) @Controller c) […]

Share this article on
< Previous Next >