Spring Autowiring only works with Interface

前端 未结 6 905
慢半拍i
慢半拍i 2020-12-16 13:53

I am quite new to spring framework and came across the following issue.

I have an interface ClassA, which is implemented by classed ClassA1

6条回答
  •  失恋的感觉
    2020-12-16 14:12

    From the little I've seen till now, it doesn't seem to be any restriction, regarding the type of class that one could mark as @Autowired.

    Non related to the issue, but this article makes reference to the situation itself

提交回复
热议问题