类 BindingResultUtils

    • 方法详细资料

      • getBindingResult

        @Nullable
        public static BindingResult getBindingResult​(Map<?,​?> model,
                                                     String name)
        Find the BindingResult for the given name in the given model.
        参数:
        model - the model to search
        name - the name of the target object to find a BindingResult for
        返回:
        the BindingResult, or null if none found
        抛出:
        IllegalStateException - if the attribute found is not of type BindingResult
      • getRequiredBindingResult

        public static BindingResult getRequiredBindingResult​(Map<?,​?> model,
                                                             String name)
        Find a required BindingResult for the given name in the given model.
        参数:
        model - the model to search
        name - the name of the target object to find a BindingResult for
        返回:
        the BindingResult (never null)
        抛出:
        IllegalStateException - if no BindingResult found