You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And in order to decouple with dubbo .
I do not use @service (com.alibaba.dubbo.config.annotation.Service) annotation on my serviceImpl class , but add @component annotation to them.
Then I config the service and refrence in another two xml file as
on the bootstrap class of my springboot application.
Then it works.
But when I config the consumer , a problem happened.
In my application.properties I set a property as
dubbo.consumer.check=false
to skip the exist check of provider
and I need a filter to do some work before a RPC request send,so I configed a filter on my xml file
<dubbo:consumerfilter="UserConsumerFilter"/>
when the application start
2019-03-07 15:23:14.672 WARN 4116 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ecAuthMenuI18n': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Duplicate consumer configs: <dubbo:consumer generic="false" filter="UserConsumerFilter" id="com.alibaba.dubbo.config.ConsumerConfig" /> and <dubbo:consumer generic="false" />
I think the first tag is from the xml and the secod tag is from the application.properties.
then I try to add a id parameter on my xml file like
Hi,
Every one.
I use dubbo spring-boot with
And in order to decouple with dubbo .
I do not use @service (com.alibaba.dubbo.config.annotation.Service) annotation on my serviceImpl class , but add @component annotation to them.
Then I config the service and refrence in another two xml file as
to regist the bean to zookeeper as a service.
Finally I use
on the bootstrap class of my springboot application.
Then it works.
But when I config the consumer , a problem happened.
In my application.properties I set a property as
dubbo.consumer.check=false
to skip the exist check of provider
and I need a filter to do some work before a RPC request send,so I configed a filter on my xml file
when the application start
I think the first tag is from the xml and the secod tag is from the application.properties.
then I try to add a id parameter on my xml file like
the warn info is :
So I think dubbo can only config one <dubbo:consumer > in a context.
Can we consider to imporve this in the future ?
我们在使用dubbo的过程中,希望可以很容易的在rpc模式和本地模式之间切换,所以并没有使用dubbo的@service注解和@refrence注解。而是使用@component注解将service的实现类注册到spring
再用额外的xml分别定义dubbo的service和refrence
在springboot的启动类中分别引入consumer和provider的xml配置。
现在我需要在consumer端加一个filter,于是,我在xml中增加了
由于原来在application.properties中指定了
dubbo.consumer.check=false
启动报错:
xml中的标签加了个id
报错:
我想这个是由于dubbo只能接受一个<dubbo:consumer />配置的原因吗?
这个是否能够作为一个issue提出来,后续加以改进呢?
谢谢。
The text was updated successfully, but these errors were encountered: