项目启动tomcat时报错:
困扰了我两个小时;
最终找到了原因:我的原因时导包时将@Service的包导错了;
这个错误一般是spring的配置文件有问题,比如:
1.dubbo引用和暴漏服务对应;
①.applicationContext-dubbo.xml
<dubbo:service interface="org.java.content.service.ContentCatService" ref="contentCatServiceImpl"></dubbo:service>
<dubbo:service interface="org.java.content.service.ContentService" ref="contentServiceImpl"></dubbo:service>
②.springmvc.xml
<dubbo:reference interface="org.java.content.service.ContentCatService" id="contentCatService"></dubbo:reference>
<dubbo:reference interface="org.java.content.service.ContentService" id="contentService"></dubbo:reference>
2.@Controller,@Service,@Autowired注解遗漏导致spring注入有问题;