org.springframework.beans.factory.NoSuchBeanDefinitionException

No qualifying bean of type [com.xyz.app.repository.MyInterfaceRepository] is defined

Samebug tips1

You could me missing na annotation (@Service or @Component) or a definition in the xml. Also, look if the class where your implementation is located is properly scanned.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web2129

  • No qualifying bean of type [com.xyz.app.repository.MyInterfaceRepository] is defined
  • No qualifying bean of type [org.springframework.boot.autoconfigure.web.ErrorController] is defined
  • No qualifying bean of type [org.springframework.security.authentication.AuthenticationManager] is defined
  • Stack trace

    • org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.xyz.app.repository.MyInterfaceRepository] is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:372) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:332) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1066) at com.xyz.app.Application.main(Application.java:60)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    2 times, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    3 times, 1 year ago
    Unknown user
    2 times, 1 year ago
    26 more bugmates