就比如
@Component
@Scope("prototype")
Class A {
private int count;
}
@Controller
Class Controller1 {
@Autowired
A a;
}
@Controller
Class Controller2 {
@Autowired
A a;
}
这两个 controller 中的成员变量 a 应该不一样吧,就比如说其中的 count 取决于控制器内发生了什么,可能是不一样的。
谢谢解答