在学习dubbo的过程中发现启动者能正常启动,但消费者一直启动不起来,启动就报错Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'consumer' defined in class path resource [spring.xml]: Cannot resolve reference to bean 'orderService' while setting bean property 'orderService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No such application config! Please add <dubbo:application name="..." /> to your spring config.
调试了很久一直不知道哪出问题了,最后偶然改了一下dubbo服务名,就是<dubbo:appclication name="consumer" /> 就能启动了,原来dubbo服务名不能叫consumer, 换了个名字就好了
改成其他名称就好了