[x] I have searched the issues of this repository and believe that this is not a duplicate.
[x] I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: 2.7.3 ~
Operating System version: linux & windows
Java version: 1.8
Steps to reproduce this issue
In daily development, I am used to keeping Dubbo reference bean in Spring container.
Like using xml config, I will write all reference bean in a config class, and use @Autowire in other class.
Sometime it runs well, sometime it will throw NoSuchBeanDefinitionException.
Problem Description:
My project tree(Consumer side):
Environment
Steps to reproduce this issue
In daily development, I am used to keeping
Dubbo reference bean
inSpring
container. Like using xml config, I will write allreference bean
in a config class, and use@Autowire
in other class. Sometime it runs well, sometime it will throwNoSuchBeanDefinitionException
. Problem Description: My project tree(Consumer side):I have two config file.
MyReferenceConfig.java
andMyPriorityReferenceConfig.java
have the same code.HelloDubbo.java
contains an annotation field(@Autowired
or@Resource
).When there is only
MyReferenceConfig.java
be register in Spring Context. It will throw an Exception:However, When only
MyPriorityReferenceConfig.java
be register in Spring Context. It will found that bean successfully.Expected Result
No Exception
Actual Result
throw a
NoSuchBeanDefinitionException