Categories
Spring Spring Core

Dependency Injection with @Resource annotation

Key Terms As like Autowired annotation Resource will resolve and inject dependencies.  Unlike Autowired annotation, it will search by Name. Means, It will take Field Name and Setter-Method parameter name to resolve dependencies. Name or ID of the Bean should be provided in XML or @Bean configuration. XML <bean id=”…” class=”…”></bean> @Bean @Bean(“…”) You can […]