How do I perform Constructor-based dependency injection with Spring using annotations?
问题 OK, so if I need to put some primitive values in the constructor, how do I do that? @Autowired public CustomBean(String name, @Qualifier("SuperBean") SuperBean superBean) { super(); this.superBean = superBean; this.name = name; } For instance here I am defining that the superBean has the Qualifier "SuperBean", but I'd also like to know how is it possible to use annotations to set the name value here? I know it's possible with xml configuration, but I want to know how to do this with