本文整理匯總了Java中org.springframework.web.util.UrlPathHelper.setRemoveSemicolonContent方法的典型用法代碼示例。如果您正苦於以下問題:Java UrlPathHelper.setRemoveSemicolonContent方法的具體用法?Java UrlPathHelper.setRemoveSemicolonContent怎麽用?Java UrlPathHelper.setRemoveSemicolonContent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.web.util.UrlPathHelper
的用法示例。
在下文中一共展示了UrlPathHelper.setRemoveSemicolonContent方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: matrixVariablesDecoding
import org.springframework.web.util.UrlPathHelper; //導入方法依賴的package包/類
@Test
public void matrixVariablesDecoding() {
MockHttpServletRequest request;
UrlPathHelper urlPathHelper = new UrlPathHelper();
urlPathHelper.setUrlDecode(false);
urlPathHelper.setRemoveSemicolonContent(false);
this.handlerMapping.setUrlPathHelper(urlPathHelper );
request = new MockHttpServletRequest();
testHandleMatch(request, "/path{filter}", "/path;mvar=a%2fb");
MultiValueMap<String, String> matrixVariables = getMatrixVariables(request, "filter");
Map<String, String> uriVariables = getUriTemplateVariables(request);
assertNotNull(matrixVariables);
assertEquals(Arrays.asList("a/b"), matrixVariables.get("mvar"));
assertEquals(";mvar=a/b", uriVariables.get("filter"));
}
示例2: configurePathMatch
import org.springframework.web.util.UrlPathHelper; //導入方法依賴的package包/類
@Override
public void configurePathMatch(PathMatchConfigurer configurer) {
UrlPathHelper urlPathHelper = new UrlPathHelper();
urlPathHelper.setRemoveSemicolonContent(false);
configurer.setUrlPathHelper(urlPathHelper);
}