When a package in the project is marked as a jar package, it cannot be found when referenced

Exception information:
Spring MVC Autowired – No qualifying bean of type [] found for dependency: expected at least 1 bean which qualifies
No qualifying bean of type [...Service] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired (required=true)}

It is very clear that the corresponding bean cannot be found during automatic injection;

 

When exporting with eclipse's export, select the folder entries check box. Otherwise, the jar package you export has no directory structure, which will cause your problems.

 

http://blog.sina.com.cn/s/blog_7d86c66c0102xprx.html

Guess you like

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