Is there a way to @Autowire a bean that requires constructor arguments?
I'm using Spring 3.0.5 and am using @Autowire annotation for my class members as much as possible. One of the beans that I need to autowire requires arguments to its constructor. I've looked through the Spring docs, but cannot seem to find any reference to how to annotate constructor arguments. In XML, I can use as part of the bean definition. Is there a similar mechanism for @Autowire annotation? Ex: @Component public class MyConstructorClass{ String var; public MyConstructorClass( String constrArg ){ this.var = var; } ... } @Service public class MyBeanService{ @Autowired MyConstructorClass