expected at least 1 bean which qualifies as autowire candidate for this depe

    1. Check whether the interface implementation class is annotated, such as service, repository, etc.

    2. Check whether the spring configuration file automatically scans the package

       <context:component-scan base-package="xxx.xx.xxx">

   3. Check if the spring container is loaded in web.xml. (I just missed the monitor, sweat...)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325228009&siteId=291194637