maven结合dubbo结合nexus搭建项目之初"报错总结""
1 caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ego.dubbo.service.TbItemDubboService] found for
dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.
Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
( 解决: 在TBItemService.java的 private TBItemDubboService tbItemDubboServiceImplements 前加注释@Reference
2 Caused by: com.alibaba.dubbo.rpc.RpcException:Fail to start server(url: dubbo://192.168.183.1:20888/com.ego.dubbo.service.TbItemDubboService?anyhost=true&application=dubbo-ego-service&channel
.readonly.sent=true&codec=dubbo&dubbo=2.5.3&heartbeat=60000&interface=com.ego.dubbo.service.
TbItemDubboService&methods=selectAll&pid=12436&side=provider×tamp=1556935580326) Failed to bind NettyServer on /192.168.183.1:20888, cause: Failed to bind to: /0.0.0.0:20888
...........
................
java.net.BindException: Address already in use
/* (技巧: 看到com.alibaba.dubbo的错 或者 看到 org.springframework 报错
怎么找错:
① 不要管com.alibaba.dubbo的错 或者 看到 org.springframework 报错,找到第1个java的错,如java.net.BindException)
*/
解决:(因为address already in use,表示图中的Test.java在用,要重新运行,得先关了,然后 run as-->java application)
3 No qualifying bean of type [com.ego.manage.service.TbItemService] found for dependency: expected at least 1 bean which qualifies as
autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=,
authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
解决: 在TbItemServiceImpl.java中加上@Service注解
4 Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project ego-manage:
Failed to clean project: Failed to delete C:\Users\Administrator\Desktop\ego-1903qi-2019-4-29(30)\01 第一天全部代码 - 副本
\ego-parent\ego-manage\target\tomcat\logs\access_log.2019-05-04 -> [Help 1]
解决: (我用的是tomcat7插件,maven build 指定的web 项目用的是:"clean tomcat7:run" 命令语句) 不难得知上面的错误是因为clean不成,那么说明之前你开的maven build没有关,所以:①先关-->②再开