title: Springboot 3.0.0-M2 AuthenticationManager
body: <p>I wanted to create a backend using spring boot.
  When I executed the application, this exception was thrown:</p>
  <blockquote>
  <p>Field authenticationManager in projekt.controller.AuthController
  required a bean of type
  'org.springframework.security.authentication.AuthenticationManager'
  that could not be found.</p>
  </blockquote>
  <p>I quickly found a solution on the internet, which includes adding a WebSecurityConfigurerAdapter in which I would add this method:</p>
  <pre><code>@Override
  @Bean
  public AuthenticationManager authenticationManagerBean() throws Exception {
      return super.authenticationManagerBean();
  }
  </code></pre>
  <p>But as I had to see, this is <a href="https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter" rel="nofollow noreferrer">deprecated</a>.</p>
  <p>My question is how would I do the same thing without using something deprecated.</p>