When to use and when to use in Spring?

前端 未结 5 1497
轻奢々
轻奢々 2020-12-14 06:51

When to use and when to use in Spring?

5条回答
  •  -上瘾入骨i
    2020-12-14 07:25

    requires that the bean being referenced is in the same config file.

    requires only it to be in the same context, or in a parent context.

    The difference is primarily one of documentation. If you see , then you know you need only look in the same file to find it. Other than that, there's not much difference. I would generally use in most cases.

提交回复
热议问题