The programming model is elegant, and the constructor-based style means you don't have to include a constructor without arguments.
编程模型是优雅的,基于构造函数的风格意味着您无需包括无参构造函数。
While using this approach we have to remember that this mechanism supports only accessor-based injection, constructor argument based injection is not supported.
在使用该方法时,我们必须记住该机制只支持访问器注入,不支持基于构造函数参数的注入。
For example, you could have multiple occurrences of the tag based on the CacheCommand constructor for your service.
例如,以您的服务的CacheCommand构造函数为基础,可能会出现大量的标签。
应用推荐