Spring 的Controller 实例化默认是单例.每次请求 controller 就会只使用这一个对象.这样如果有返回值的输出的话,有可能输出之前的数据输出.但是加快访问速度,但是有这个弊端.解决这个问题,使用Spring的@Scope("prototype")注解,让单例变成多例.@Scope("prototype")@Controllerpublic class TestController {got it !