posted 1 week ago
Just found this in the spring.io documentation:
Similar to @Autowired, @Resource may fall back to standard bean type matches (i.e. find a primary type match instead of a specific named bean) as well as resolve well-known "resolvable dependencies": the BeanFactory interface, the ApplicationContext interface, the ResourceLoader interface, the ApplicationEventPublisher interface and the MessageSource interface. Note that this only applies to @Resource usage with no explicit name specified!
Ref:https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch04s11.html
I've found my answer.
Thanks,
IC