类 ViewNameMethodReturnValueHandler

  • 所有已实现的接口:
    HandlerMethodReturnValueHandler

    public class ViewNameMethodReturnValueHandler
    extends Object
    implements HandlerMethodReturnValueHandler
    Handles return values of types void and String interpreting them as view name reference. As of 4.2, it also handles general CharSequence types, e.g. StringBuilder or Groovy's GString, as view names.

    A null return value, either due to a void return type or as the actual return value is left as-is allowing the configured RequestToViewNameTranslator to select a view name by convention.

    A String return value can be interpreted in more than one ways depending on the presence of annotations like @ModelAttribute or @ResponseBody. Therefore this handler should be configured after the handlers that support these annotations.

    从以下版本开始:
    3.1
    作者:
    Rossen Stoyanchev, Juergen Hoeller