Description
Henri Karapuu opened SPR-3646 and commented
The naming of @Autowired
and @Resource
annotations does not make any sense.
One autowires by type, other by name, but the annotation names do not reflect this in any way, and are even of completely different grammatical form.
My suggestion would be to add attribute to the @Autowired
annotation, which would set the autowire type to 'name', 'type' or 'autodetect'. If the default would be 'type' then full backwards compatibility would maintained. This way those of us who don't care about commons annotations could use @Autowired
for everything, and have much cleaner looking code. Plus, we would get the added benefit of autodetecting the type.
The @Resource
could be kept as is for those who want to be compatible with commons annotations.
No further details from SPR-3646