Spring框架是否提供String常量来替换下面示例注释中的"prototype"字符串文字值?
@Service
@Scope("prototype")
public class CustomerService
{
......
}
Run Code Online (Sandbox Code Playgroud)
谢谢!
Rei*_*eus 30
您可以使用Spring的BeanDefinition中的范围常量:
例如
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8360 次 |
| 最近记录: |