Could not autowire. No beans 'here name' type found

11,310

Intellij doesn't always resolve the autowiring, even if the application runs fine.

If it runs fine and you don't get compile errors ignore it.

Try running rebuild project to fix it.

You can add a list of packages to component scan also

@ComponentScan(basePackages = { "com.a.b", "com.a.c" })
Share:
11,310
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    Created a class that implements the AuthenticationSuccessHandler and added the @Component daemon to associate it with the Spring Security configuration object. https://zapodaj.net/b3085e4c1cd43.png.html

     @Component
     public class CustomAuthenticationSuccessHandler implements AuthenticationSuccessHandler {..}
    

    IntelliJ shows me a message that

    Could not autowire. No beans of 'CustomAuthenticationSuccessHandler' type found