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.
具体来说,使用容器而不是静态 ObjectFactory 会让我保持多个并发配置,还是容器是单例的?
如果容器是静态的,则容器仅是单例。静态类型有很多问题,特别是在可测试性方面,所以我绝对更喜欢自己使用容器实例。