Why Controller layer, automatically injected Iservice, rather than serviceImpI?

Often write code: @Autowrite Aservice aservice

I do not understand why the injection is an abstraction layer, rather than the implementation layer, until you see the this blog: https: //blog.csdn.net/qq_31963719/article/details/79458002

I understand what is called oriented programming interface

 

When the automatic injector abstraction layer, instantiates the abstract class, and a service implementation class serviceImp, it automatically generates the implementation class.

Guess you like

Origin www.cnblogs.com/zzw3014/p/11798360.html