title: Request Matcher not resolved while migrating spring security from 3 to 4
body: <p>I am migrating my spring security from 3.1.4 to 4.1.5. I am using RequestMatcher in my security config to filter out urls.I updated RequestMatcher to the correct package as suggested in Migration document to org.springframework.security.web.util.matcher.RequestMatcher.</p>
  
  <p>I am pointing request-matcher-ref in  to point the a custom class which implements RequestMatcher. But i am getting the following error in intellij - Cannot resolve required base class 'org.springframework.security.web.util.RequestMatcher'.
  How to resolve this issue.</p>
  
  <p>security.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:security="http://www.springframework.org/schema/security"
  xmlns:oauth2="http://www.springframework.org/schema/security/oauth2"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                      http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
                      http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2.xsd"&gt;
  
  &lt;security:debug/&gt;
  
  &lt;bean id="preflightRequestMatcher" class="com.genesyslab.rcs.security.RequestMethodMatcher"&gt;
      &lt;constructor-arg index="0" value="OPTIONS"/&gt;
      &lt;constructor-arg index="1" value="true"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="regularRequestMatcher" class="com.genesyslab.rcs.security.RequestMethodMatcher"&gt;
      &lt;constructor-arg index="0" value="OPTIONS"/&gt;
      &lt;constructor-arg index="1" value="false"/&gt;
  &lt;/bean&gt;
  
  
  &lt;security:http auto-config="false" create-session="never" request-matcher-ref="preflightRequestMatcher" &gt;
      &lt;security:intercept-url pattern="/**" access="ROLE_ANONYMOUS, IS_AUTHENTICATED_FULLY"/&gt;
      &lt;security:http-basic /&gt;
  &lt;/security:http&gt;
  
  &lt;security:http pattern="/contact-centers/*/user-recordings/*/play/**" security="none" auto-config="false" create-session="always"/&gt;
  &lt;security:http pattern="/contact-centers/*/user-screen-recordings/*/play/**" security="none" auto-config="false" create-session="always"/&gt;
  
  &lt;security:http auto-config="false" create-session="always" request-matcher-ref="regularRequestMatcher"&gt;
      &lt;security:intercept-url pattern="/loginsession" access="IS_AUTHENTICATED_FULLY" /&gt;
      &lt;security:intercept-url pattern="/logoutsession" access="IS_AUTHENTICATED_FULLY" /&gt;
      &lt;security:intercept-url pattern="/keepalivesession" access="IS_AUTHENTICATED_FULLY" /&gt;
      &lt;security:intercept-url pattern="/recordings/**" access="IS_AUTHENTICATED_FULLY" /&gt;
      &lt;security:intercept-url pattern="/contact-centers/*/recordings/**" access="IS_AUTHENTICATED_FULLY" /&gt;
      &lt;security:intercept-url pattern="/screen-recordings/**" access="IS_AUTHENTICATED_FULLY" /&gt;
      &lt;security:intercept-url pattern="/certificates" access="ROLE_RECORD_KEY_READ,ROLE_DEFAULT_USER" /&gt;
      &lt;security:intercept-url pattern="/certificatepems" access="ROLE_RECORD_KEY_READ,ROLE_DEFAULT_USER" /&gt;
      &lt;security:intercept-url pattern="/checkcertificate" access="ROLE_RECORD_KEY_UPLOAD,ROLE_DEFAULT_USER" /&gt;
      &lt;security:intercept-url pattern="/checkkey" access="ROLE_RECORD_KEY_UPLOAD,ROLE_DEFAULT_USER" /&gt;
      &lt;security:intercept-url pattern="/addcertificateandkey" access="ROLE_RECORD_KEY_UPLOAD,ROLE_DEFAULT_USER" /&gt;
      &lt;security:intercept-url pattern="/removecertificateandkey" access="ROLE_RECORD_KEY_UPLOAD,ROLE_DEFAULT_USER" /&gt;
      &lt;security:intercept-url pattern="/version" access="ROLE_ANONYMOUS, IS_AUTHENTICATED_FULLY" /&gt;
      &lt;!-- All URLs should be covered above, it's error if we match this one --&gt;
      &lt;security:intercept-url pattern="/**" access="ROLE_NOMATCH" /&gt;
  
      &lt;security:session-management&gt;
          &lt;security:concurrency-control max-sessions="999999" error-if-maximum-exceeded="false"/&gt;
      &lt;/security:session-management&gt;
  
      &lt;security:http-basic /&gt;
  
  &lt;/security:http&gt;
  
  &lt;security:authentication-manager&gt;
      &lt;security:authentication-provider ref='rcsAuthenticationProvider'/&gt;
  &lt;/security:authentication-manager&gt;
  </code></pre>
  
  <p></p>
  
  <p>RequestMethodMatcher.java</p>
  
  <pre><code>import lombok.AllArgsConstructor;
  import org.springframework.security.web.util.matcher.RequestMatcher;
  import javax.servlet.http.HttpServletRequest;
  
  @AllArgsConstructor
   public class RequestMethodMatcher implements RequestMatcher
  {
  
  final private String method;
  
  final private boolean matchIfEqual;
  
  @Override
  public boolean matches(HttpServletRequest request) {
      return method.equalsIgnoreCase(request.getMethod()) == matchIfEqual;
  }
  }
  </code></pre>