Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道最佳实践问题并考虑易于测试的类,当我需要特定类中相同(制造)对象的多个不同实例时,推荐哪种方法?
之前我用过ServiceManager的构建方式,但是现在已经不推荐直接把ServiceManager注入到一个类中了吧?