在使用@ResponseBody注解后controller方法只会返回ModelandView对象的数据模型,不会返回视图,这样有很多好处,但是如果在拦截器中进行了页面转发,在满足页面转发条件时,不会进行转发,原因在我看来是因为controller线执行注解在执行拦截器,这时已经绝定这个方法不能返回视图,所以不能进行页面跳转 我的解决方法是不用@ResponseBody注解,controller返回值为void,将想要return的数据模型通过response.getWriter().write