Top "Autowired" questions

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

Can spring @Autowired Map?

Here's the Map @Autowired private Map<String, ISendableConverter> converters; and ISendableConverter public interface ISendableConverter { ISendableMsg convert(BaseMessage baseMessage); …

java spring autowired
Is Spring @autowired not meant for non-singleton containers?

I have a MyTask class which implements Runnable and there can be many such objects instantiated at any given moment. …

spring singleton spring-aop autowired
Spring+Hibernate, Autowire sessionFactory into hibernate DAO

i have an Hibernate DAO, in according with Hibernate API 3 and Spring 3.x, I use simply a sessionFactory and NOT …

hibernate spring autowired sessionfactory
Spring injects dependencies in constructor without @Autowired annotation

I'm experimenting with examples from this official Spring tutorials and there is a dependency on this code: https://github.com/…

spring spring-boot dependency-injection autowired
Spring autowired bean causes null pointer

I have a logger class that makes use of a service. Each time a new logger is created, I expect …

java spring junit autowired spring-annotations
Spring: get all Beans of certain interface AND type

In my Spring Boot application, suppose I have interface in Java: public interface MyFilter<E extends SomeDataInterface> (a …

java spring spring-boot autowired
Spring boot autowiring an interface with multiple implementations

In normal Spring, when we want to autowire an interface, we define it's implementation in Spring context file. What about …

spring spring-boot junit autowired
Spring 3.0.5 doesn't evaluate @Value annotation from properties

Trying to auto-wire properties to a bean in Spring 3.0.5.RELEASE, I'm using: config.properties: username=myusername main-components.xml: <context:…

spring frameworks properties autowired
Is it possible to wire a Spring MVC Interceptor using annotations?

Is it possible to wire a Spring MVC Interceptor using annotations and if so could someone provide me with an …

spring spring-mvc annotations interceptor autowired
Inject bean into enum

I have the DataPrepareService that prepare data for reports and I have an Enum with report types, and I need …

java spring dependency-injection autowired