title: "NoClassDefFoundError: org/springframework/web/method/HandlerMethodSelector" in Spring Security OAuth after upgrading from Spring 4.3 to 5.0
body: <p>I'm trying to upgrade a project from Spring 4.3 to 5.0 and ran into what seems to be an issue in Spring Security OAuth. In particular a stack of nested bean creation failures of the form:</p>
  
  <pre><code>Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauth2EndpointHandlerMapping' defined in class path resource [org/springframework/security/oauth2/config/annotation/web/configuration/AuthorizationServerEndpointsConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/method/HandlerMethodSelector
  ...
  Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oauth2EndpointHandlerMapping' defined in class path resource [org/springframework/security/oauth2/config/annotation/web/configuration/AuthorizationServerEndpointsConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/method/HandlerMethodSelector
  ...
  Caused by: java.lang.NoClassDefFoundError: org/springframework/web/method/HandlerMethodSelector
  </code></pre>
  
  <p>It appears that <em>org.springframework.web.method.HandlerMethodSelector</em> got deprecated in late-ish Spring 4.x releases and then removed altogether in Spring 5.x.</p>
  
  <p>The actual versions I'm trying to make work together are:</p>
  
  <ul>
  <li>Spring Framework: 5.0.6</li>
  <li>Spring Security: 5.0.6</li>
  <li>Spring Security OAuth: 2.3.3</li>
  </ul>
  
  <p>The Spring Security OAuth version is the latest so I'm not sure where to go next. Is there just not a version of it that's compatible with Spring 5.x? If that's the case, what are my options?</p>