protected final List<MvcRequestMatcher> createMvcMatchers(HttpMethod method,
			String... mvcPatterns) {
		Assert.state(!this.anyRequestConfigured, "Can't configure mvcMatchers after anyRequest");
		ObjectPostProcessor<Object> opp = this.context.getBean(ObjectPostProcessor.class);
		if (!this.context.containsBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME)) {
			throw new NoSuchBeanDefinitionException("A Bean named " + HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME +" of type " + HandlerMappingIntrospector.class.getName()
				+ " is required to use MvcRequestMatcher. Please ensure Spring Security & Spring MVC are configured in a shared ApplicationContext.");
		}
		HandlerMappingIntrospector introspector = this.context.getBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME,
			HandlerMappingIntrospector.class);
		List<MvcRequestMatcher> matchers = new ArrayList<>(
				mvcPatterns.length);
		for (String mvcPattern : mvcPatterns) {
			MvcRequestMatcher matcher = new MvcRequestMatcher(introspector, mvcPattern);
			opp.postProcess(matcher);

			if (method != null) {
				matcher.setMethod(method);
			}
			matchers.add(matcher);
		}
		return matchers;
	}
protected final List<MvcRequestMatcher> createMvcMatchers(HttpMethod method,
			String... mvcPatterns) {
		Assert.state(!this.anyRequestConfigured, "Can't configure mvcMatchers after anyRequest");
		ObjectPostProcessor<Object> opp = this.context.getBean(ObjectPostProcessor.class);
		if (!this.context.containsBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME)) {
			throw new NoSuchBeanDefinitionException("A Bean named " + HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME +" of type " + HandlerMappingIntrospector.class.getName()
				+ " is required to use MvcRequestMatcher. Please ensure Spring Security & Spring MVC are configured in a shared ApplicationContext.");
		}
		HandlerMappingIntrospector introspector = this.context.getBean(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME,
			HandlerMappingIntrospector.class);
		List<MvcRequestMatcher> matchers = new ArrayList<>(
				mvcPatterns.length);
		for (String mvcPattern : mvcPatterns) {
			MvcRequestMatcher matcher = new MvcRequestMatcher(introspector, mvcPattern);
			opp.postProcess(matcher);

			if (method != null) {
				matcher.setMethod(method);
			}
			matchers.add(matcher);
		}
		return matchers;
	}
protected final List < MvcRequestMatcher > createMvcMatchers ( HttpMethod method , String ... mvcPatterns ) { Assert . state ( ! this . anyRequestConfigured , "Can't configure mvcMatchers after anyRequest" ) ; ObjectPostProcessor < Object > opp = this . context . getBean ( ObjectPostProcessor . class ) ; if ( ! this . context . containsBean ( HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME ) ) { throw new NoSuchBeanDefinitionException ( "A Bean named " + HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME + " of type " + HandlerMappingIntrospector . class . getName ( ) + " is required to use MvcRequestMatcher. Please ensure Spring Security & Spring MVC are configured in a shared ApplicationContext." ) ; } HandlerMappingIntrospector introspector = this . context . getBean ( HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME , HandlerMappingIntrospector . class ) ; List < MvcRequestMatcher > matchers = new ArrayList <> ( mvcPatterns . length ) ; for ( String mvcPattern : mvcPatterns ) { MvcRequestMatcher matcher = new MvcRequestMatcher ( introspector , mvcPattern ) ; opp . postProcess ( matcher ) ; if ( method != null ) { matcher . setMethod ( method ) ; } matchers . add ( matcher ) ; } return matchers ; }
Creates {@link MvcRequestMatcher} instances for the method and patterns passed in

@param method the HTTP method to use or null if any should be used
@param mvcPatterns the Spring MVC patterns to match on
@return a List of {@link MvcRequestMatcher} instances
Creates { @link MvcRequestMatcher } instances for the method and patterns passed in