Java Code Examples for org.springframework.web.servlet.mvc.method.RequestMappingInfo#getMatchingCondition()

The following examples show how to use org.springframework.web.servlet.mvc.method.RequestMappingInfo#getMatchingCondition() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RequestMappingHandlerMapping.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Override
public RequestMatchResult match(HttpServletRequest request, String pattern) {
	RequestMappingInfo info = RequestMappingInfo.paths(pattern).options(this.config).build();
	RequestMappingInfo matchingInfo = info.getMatchingCondition(request);
	if (matchingInfo == null) {
		return null;
	}
	Set<String> patterns = matchingInfo.getPatternsCondition().getPatterns();
	String lookupPath = getUrlPathHelper().getLookupPathForRequest(request, LOOKUP_PATH);
	return new RequestMatchResult(patterns.iterator().next(), lookupPath, getPathMatcher());
}
 
Example 2
Source File: RequestMappingHandlerMapping.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Override
public RequestMatchResult match(HttpServletRequest request, String pattern) {
	RequestMappingInfo info = RequestMappingInfo.paths(pattern).options(this.config).build();
	RequestMappingInfo matchingInfo = info.getMatchingCondition(request);
	if (matchingInfo == null) {
		return null;
	}
	Set<String> patterns = matchingInfo.getPatternsCondition().getPatterns();
	String lookupPath = getUrlPathHelper().getLookupPathForRequest(request);
	return new RequestMatchResult(patterns.iterator().next(), lookupPath, getPathMatcher());
}
 
Example 3
Source File: RequestMappingHandlerMapping.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
@Override
public RequestMatchResult match(HttpServletRequest request, String pattern) {
	RequestMappingInfo info = RequestMappingInfo.paths(pattern).options(this.config).build();
	RequestMappingInfo matchingInfo = info.getMatchingCondition(request);
	if (matchingInfo == null) {
		return null;
	}
	Set<String> patterns = matchingInfo.getPatternsCondition().getPatterns();
	String lookupPath = getUrlPathHelper().getLookupPathForRequest(request);
	return new RequestMatchResult(patterns.iterator().next(), lookupPath, getPathMatcher());
}