No matching bean of type … found for dependency

后端 未结 8 777
孤城傲影
孤城傲影 2020-12-04 14:05

after some days of trying and waitin\' for answers on the springsource forums I\'ll try it here. Running my application results in these exception:

org.sprin         


        
8条回答
  •  旧巷少年郎
    2020-12-04 14:55

    Multiple things can cause this, I didn't bother to check your entire repository, so I'm going out on a limb here.

    First off, you could be missing an annotation (@Service or @Component) from the implementation of com.example.my.services.user.UserService, if you're using annotations for configuration. If you're using (only) xml, you're probably missing the -definition for the UserService-implementation.

    If you're using annotations and the implementation is annotated correctly, check that the package where the implementation is located in is scanned (check your -value).

提交回复
热议问题