Spring Auto-Wiring Beans with @Autowired annotation
 In Spring, you can use @Autowired  annotation to auto  wire bean on the setter method, constructor or a field.   There are two ways to can achieve it :  1.Using <context:annotation-config />      Just Add Spring context and <context:annotation-config /> in bean configuration file   <beans xmlns="http://www.springframework.org/schema/beans"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"     xmlns:tx="http://www.springframework.org/schema/tx"     xmlns:context="http://www.springframework.org/schema/context"     xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-3.0.xsd     http://www.springframework.org/schema/aop     http://www.springframework.org/schema/aop/spring-aop.xsd     http://www.springframework.org/sche...