Top "Autowired" questions

Autowiring is a DI container feature where the dependencies are automatically looked for according to some criteria.

Spring 3 Annotations - HibernateDaoSupport - Repository Requires Session Factory

I am getting an exception saying : java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required When trying to use the @Repository …

hibernate spring annotations autowired
Can't I @Autowire a Bean which is present in a dependent Library Jar?

I have a Spring Boot application (Y) which relies upon a set of Library files packed as x.jar and …

java spring autowired
Spring DI - Autowired property is null in a REST service

I'm getting started with Spring DI, but I'm struggling with dependency injection and the worse part is that I'm not …

spring dependency-injection nullpointerexception jersey autowired
@Autowired(required=false) on constructor giving NoSuchBeanDefinitionException

In a Spring application, I have used @Autowired(required=false) on constructor. This means that if the bean that will …

spring autowired
How to dynamically inject a service using a runtime "qualifier" variable?

I can't find a simple way to inject a component/service given a runtime value. I started reading @ Spring's doc: …

spring service dependency-injection autowired
How to get Spring WebContext in class annotated @controller

In Spring MVC with annotation, we mark any POJO with @Controller. In this controller we can get WebApplicationContext, using autowired …

spring servlets spring-mvc autowired applicationcontext
How do I autowire a Spring TaskExecutor created thread?

According to Spring's documentation the way to use the TaskExecutor is as follows: import org.springframework.core.task.TaskExecutor; public …

java multithreading spring autowired
@Autowire default mode

How does Spring @Autowire beans: byName or byType? If one is not possible, is a second trial done using another …

spring autowired
autowire boolean primitive from properties file

Hi I want to autowire boolean value from properties file have referred following link with maps url Spring properties (property-placeholder) …

spring autowired
@Autowired object gets a null value in one class, while successfully wired in another

I am working on a project using Spring 3, and Spring Security. My problem is with IoC container. Problem started when …

spring spring-mvc autowired