當前位置: 首頁>>代碼示例>>Java>>正文


Java MatrixVariableMethodArgumentResolver類代碼示例

本文整理匯總了Java中org.springframework.web.servlet.mvc.method.annotation.MatrixVariableMethodArgumentResolver的典型用法代碼示例。如果您正苦於以下問題:Java MatrixVariableMethodArgumentResolver類的具體用法?Java MatrixVariableMethodArgumentResolver怎麽用?Java MatrixVariableMethodArgumentResolver使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MatrixVariableMethodArgumentResolver類屬於org.springframework.web.servlet.mvc.method.annotation包,在下文中一共展示了MatrixVariableMethodArgumentResolver類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getArgumentResolvers

import org.springframework.web.servlet.mvc.method.annotation.MatrixVariableMethodArgumentResolver; //導入依賴的package包/類
private List<HandlerMethodArgumentResolver> getArgumentResolvers(List<HttpMessageConverter<?>> messageConverters) {
	List<HandlerMethodArgumentResolver> resolvers = new LinkedList<>();

	resolvers.add(new RequestParamMethodArgumentResolver(beanFactory, false));
	resolvers.add(new RequestParamMapMethodArgumentResolver());
	resolvers.add(new MatrixVariableMethodArgumentResolver());
	resolvers.add(new MatrixVariableMapMethodArgumentResolver());
	resolvers.add(new ServletModelAttributeMethodProcessor(false));
	resolvers.add(new RequestResponseBodyMethodProcessor(messageConverters));
	resolvers.add(new RequestPartMethodArgumentResolver(messageConverters));
	resolvers.add(new RequestHeaderMethodArgumentResolver(beanFactory));
	resolvers.add(new RequestHeaderMapMethodArgumentResolver());
	resolvers.add(new ServletCookieValueMethodArgumentResolver(beanFactory));
	resolvers.add(new ExpressionValueMethodArgumentResolver(beanFactory));

	resolvers.add(new ServletRequestMethodArgumentResolver());
	resolvers.add(new ServletResponseMethodArgumentResolver());
	resolvers.add(new HttpEntityMethodProcessor(messageConverters));
	resolvers.add(new RedirectAttributesMethodArgumentResolver());
	resolvers.add(new ModelMethodProcessor());
	resolvers.add(new MapMethodProcessor());
	resolvers.add(new ErrorsMethodArgumentResolver());
	resolvers.add(new SessionStatusMethodArgumentResolver());
	resolvers.add(new UriComponentsBuilderMethodArgumentResolver());

	resolvers.add(new RequestParamMethodArgumentResolver(beanFactory, true));
	resolvers.add(new ServletModelAttributeMethodProcessor(true));

	return resolvers;
}
 
開發者ID:crnk-project,項目名稱:crnk-framework,代碼行數:31,代碼來源:SpringParameterProvider.java

示例2: getUifArgumentResolvers

import org.springframework.web.servlet.mvc.method.annotation.MatrixVariableMethodArgumentResolver; //導入依賴的package包/類
/**
 * Return the list of argument resolvers to use including built-in resolvers
 * and custom resolvers provided via {@link #setCustomArgumentResolvers}.
 */
protected List<HandlerMethodArgumentResolver> getUifArgumentResolvers() {
    List<HandlerMethodArgumentResolver> resolvers = new ArrayList<HandlerMethodArgumentResolver>();

    resolvers.add(new UifDefaultFormMethodArgumentResolver());

    // Annotation-based argument resolution
    resolvers.add(new RequestParamMethodArgumentResolver(getBeanFactory(), false));
    resolvers.add(new RequestParamMapMethodArgumentResolver());
    resolvers.add(new PathVariableMethodArgumentResolver());
    resolvers.add(new PathVariableMapMethodArgumentResolver());
    resolvers.add(new MatrixVariableMethodArgumentResolver());
    resolvers.add(new MatrixVariableMapMethodArgumentResolver());
    resolvers.add(new ServletModelAttributeMethodProcessor(false));
    resolvers.add(new RequestResponseBodyMethodProcessor(getMessageConverters()));
    resolvers.add(new RequestPartMethodArgumentResolver(getMessageConverters()));
    resolvers.add(new RequestHeaderMethodArgumentResolver(getBeanFactory()));
    resolvers.add(new RequestHeaderMapMethodArgumentResolver());
    resolvers.add(new ServletCookieValueMethodArgumentResolver(getBeanFactory()));
    resolvers.add(new ExpressionValueMethodArgumentResolver(getBeanFactory()));

    // Type-based argument resolution
    resolvers.add(new ServletRequestMethodArgumentResolver());
    resolvers.add(new ServletResponseMethodArgumentResolver());
    resolvers.add(new HttpEntityMethodProcessor(getMessageConverters()));
    resolvers.add(new RedirectAttributesMethodArgumentResolver());
    resolvers.add(new ModelMethodProcessor());
    resolvers.add(new MapMethodProcessor());
    resolvers.add(new ErrorsMethodArgumentResolver());
    resolvers.add(new SessionStatusMethodArgumentResolver());
    resolvers.add(new UriComponentsBuilderMethodArgumentResolver());

    // Custom arguments
    if (getCustomArgumentResolvers() != null) {
        resolvers.addAll(getCustomArgumentResolvers());
    }

    // Catch-all
    resolvers.add(new RequestParamMethodArgumentResolver(getBeanFactory(), true));
    resolvers.add(new ServletModelAttributeMethodProcessor(true));

    return resolvers;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:47,代碼來源:UifRequestMappingHandlerAdapter.java


注:本文中的org.springframework.web.servlet.mvc.method.annotation.MatrixVariableMethodArgumentResolver類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。