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.
Spring 框架是否提供字符串常量来替换下面示例注释中的“原型”字符串文字值?
@Service @Scope("prototype") public class CustomerService { ...... }
谢谢!
您可以使用 Spring 的BeanDefinition中的范围常量:
例如
@Scope(BeanDefinition.SCOPE_PROTOTYPE)