java这意味着什么:如果没有返回模型,就不会呈现视图?
Spring MVC's documentation states
If a model is returned, the view is rendered. If no model is returned (maybe due to a preprocessor or postprocessor intercepting the request, perhaps for security reasons), no view is rendered, because the request could already have been fulfilled.
这是什么意思
# 1 楼答案
简单地说,如果没有返回视图页面的值,可能被某些安全性阻止,任何可以阻止或拦截该响应的东西(例如CSRF),IntenalViewResolver将不会为您呈现任何内容。 这进一步告诉您,如果特定的@RequestMapping URL不返回视图页面值,则不会呈现任何内容。 InternalViewResolver呈现视图的唯一方法是返回视图名称,并且在该过程中不会被阻止