title: Enable Oauth2(Basic+password granttype) in Springboot 2.0,OAuth2LoginAuthenticationFilter class not found error
body: <p>I am using spring-boot 2.0 and Spring security 5.0+ to create an authrorization server based on oauth2.0.I am getting below error when tomcat is starting even when spring-security-oauth2-client is in classpath as below.</p>
  
  <pre><code>&lt;dependency&gt;
  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
  &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.springframework.security.oauth.boot&lt;/groupId&gt;
  &lt;artifactId&gt;spring-security-oauth2-autoconfigure&lt;/artifactId&gt;
  &lt;version&gt;2.0.0.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.springframework.security.oauth&lt;/groupId&gt;
  &lt;artifactId&gt;spring-security-oauth2&lt;/artifactId&gt;
  &lt;version&gt;2.3.0.RELEASE&lt;/version&gt;
  &lt;/dependency&gt; 
  &lt;dependency&gt;
  &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
  &lt;artifactId&gt;spring-security-oauth2-client&lt;/artifactId&gt;
  &lt;/dependency&gt;
  
  Caused by: java.lang.ClassNotFoundException: org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_111]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_111]
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[?:1.8.0_111]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_111]
      at org.springframework.security.config.annotation.web.builders.HttpSecurity.oauth2Login(HttpSecurity.java:991) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at com.oauth.oauthserver.DemoSecurityConfig.configure(DemoSecurityConfig.java:39) ~[classes/:?]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:230) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:321) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at com.oauth.oauthserver.DemoSecurityConfig$$EnhancerBySpringCGLIB$$34fbb215.init(&lt;generated&gt;) ~[classes/:?]
      at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$581ced26.CGLIB$springSecurityFilterChain$4(&lt;generated&gt;) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$581ced26$$FastClassBySpringCGLIB$$3be2fd03.invoke(&lt;generated&gt;) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$581ced26.springSecurityFilterChain(&lt;generated&gt;) ~[spring-security-config-5.0.4.RELEASE.jar:5.0.4.RELEASE]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
      at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) ~[spring-beans-5.0.5.RELEASE.jar:5.0.5.RELEASE]
      ... 20 more
  </code></pre>
  
  <p>What can be the cause of this exception?</p>
  
  <p>Thanks
  Isuru</p>