为什么@Resource不允许多参数方法

时间:2015-02-07 14:13:26

标签: java spring dependency-injection inversion-of-control autowired

根据SpringReference @Resource is supported only for fields and bean property setter methods with a single argument.

有人可以帮我解释为什么@Resource不支持多参数方法。虽然查看@Autowired@Resource代码的类似实现 Autwired @target(值= {构造函数,字段,方法}) @Retention(值= RUNTIME)

资源: - @target(值= {类型,字段,METHOD}) @Retention(值= RUNTIME)

0 个答案:

没有答案
相关问题