hyberbin opened a new issue #8221:
URL: https://github.com/apache/dubbo/issues/8221
### Environment
* Dubbo version: 3.0.1
* Operating System version: windows 11
* Java version: 1.8
### Steps to reproduce this issue
1.在某个controller中 对roleAuthorizationService引用
@DubboReference(timeout = 50000)
private RoleAuthorizationService roleAuthorizationService;
2. 在另一个controller中 对roleAuthorizationService引用
@DubboReference
private RoleAuthorizationService roleAuthorizationService;
3. 启动报错
### Expected Result
service完全一样,只不过对部分方法有定制,应该能正常启动
### Actual Result
启动报错
```
Error starting ApplicationContext. To display the conditions report re-run
your application with 'debug' enabled.
14:51:18.522 [main] ERROR o.s.boot.SpringApplication - Application run
failed
org.springframework.beans.factory.BeanCreationException: Already exists
another reference bean with the same bean name and type but difference
attributes. In order to avoid injection confusion, please modify the name of
one of the beans: prev:
roleAuthorizationService[ReferenceBean:org.prophetech.hyperone.authorization.service.RoleAuthorizationService(timeout=50000)],
new:
roleAuthorizationService[ReferenceBean:org.prophetech.hyperone.authorization.service.RoleAuthorizationService()].
Please check private
org.prophetech.hyperone.authorization.service.RoleAuthorizationService
org.prophetech.hyperone.authorization.controller.UserController.roleAuthorizationService
at
org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.registerReferenceBean(ReferenceAnnotationBeanPostProcessor.java:394)
at
org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.prepareInjection(ReferenceAnnotationBeanPostProcessor.java:317)
at
org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessBeanFactory(ReferenceAnnotationBeanPostProcessor.java:149)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:291)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:175)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]