接口的使用
org.springframework.ui.Model
使用Model的程序包 程序包 说明 org.springframework.ui Generic support for UI layer concepts.org.springframework.validation.support Support classes for handling validation results.org.springframework.web.reactive Top-level package for thespring-webfluxmodule that containsDispatcherHandler, the main entry point for WebFlux server endpoint processing including key contracts used to map requests to handlers, invoke them, and process the result.org.springframework.web.reactive.result.method.annotation Infrastructure for annotation-based handler method processing.org.springframework.web.servlet.mvc.support Support package for MVC controllers.org.springframework.ui中Model的使用
实现Model的org.springframework.ui中的类 修饰符和类型 类 说明 classConcurrentModelImplementation of theModelinterface based on aConcurrentHashMapfor use in concurrent scenarios.classExtendedModelMap返回Model的org.springframework.ui中的方法 修饰符和类型 方法 说明 ModelModel. addAllAttributes(Collection<?> attributeValues)Copy all attributes in the suppliedCollectioninto thisMap, using attribute name generation for each element.ModelModel. addAllAttributes(Map<String,?> attributes)Copy all attributes in the suppliedMapinto thisMap.ModelModel. addAttribute(Object attributeValue)Add the supplied attribute to thisMapusing agenerated name.ModelModel. addAttribute(String attributeName, Object attributeValue)Add the supplied attribute under the supplied name.ModelModel. mergeAttributes(Map<String,?> attributes)Copy all attributes in the suppliedMapinto thisMap, with existing objects of the same name taking precedence (i.e. not getting replaced).org.springframework.validation.support中Model的使用
实现Model的org.springframework.validation.support中的类 修饰符和类型 类 说明 classBindingAwareConcurrentModelSubclass ofConcurrentModelthat automatically removes theBindingResultobject when its corresponding target attribute is replaced through regularMapoperations.classBindingAwareModelMapSubclass ofExtendedModelMapthat automatically removes aBindingResultobject if the corresponding target attribute gets replaced through regularMapoperations.org.springframework.web.reactive中Model的使用
org.springframework.web.reactive.result.method.annotation中Model的使用
参数类型为Model的org.springframework.web.reactive.result.method.annotation中的方法 修饰符和类型 方法 说明 protected voidAbstractNamedValueArgumentResolver. handleResolvedValue(Object arg, String name, MethodParameter parameter, Model model, ServerWebExchange exchange)Invoked after a value is resolved.protected voidPathVariableMethodArgumentResolver. handleResolvedValue(Object arg, String name, MethodParameter parameter, Model model, ServerWebExchange exchange)org.springframework.web.servlet.mvc.support中Model的使用
org.springframework.web.servlet.mvc.support中Model的子接口 修饰符和类型 接口 说明 interfaceRedirectAttributesA specialization of theModelinterface that controllers can use to select attributes for a redirect scenario.实现Model的org.springframework.web.servlet.mvc.support中的类 修饰符和类型 类 说明 classRedirectAttributesModelMap