I have a bunch of Spring beans which are picked up from the classpath via annotations, e.g.
@Repository("personDao")
public class PersonDaoImpl extends AbstractDaoImpl implements PersonDao {
// Implementation omitted
}
In the Spring XML file, there's a PropertyPlaceholderConfigurer defined:
<bean …
I am going through some blogs on SpringSource and in one of the blogs, author is using @Inject and I suppose he can also use @Autowired.
Here is the piece of code:
@Inject private CustomerOrderService customerOrderService;
I am not sure …
Which annotation, @Resource (jsr250) or @Autowired (Spring-specific) should I use in DI?
I have successfully used both in the past, @Resource(name="blah") and @Autowired @Qualifier("blah")
My instinct is to stick with the @Resource tag since it's been ratified …