zhangzhiyu112233 opened a new issue, #16083: URL: https://github.com/apache/dubbo/issues/16083
### Pre-check - [x] I am sure that all the content I provide is in English. ### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues. ### Apache Dubbo Component Java SDK (apache/dubbo) ### Dubbo Version dubbo-dubbo-3.2.9 open jdk 8 ### Steps to reproduce this issue https://github.com/apache/dubbo/tree/dubbo-3.2.9 但使用dubbo 泛化调用的功能初始化。一个 dubbo consumer的时候,会导致这个consumer无法被注册为spring的bean。 ### What you expected to happen 比如注册一个泛化调用的consumer <img width="1702" height="538" alt="Image" src="https://github.com/user-attachments/assets/f1496bf4-bcf4-49f9-9ee1-34d0018ef301" /> 如果这个com.xxx.XxxService 在当前的代码包里存在这类,但是仍然设置 reference.setGeneric(true);会导致代理对象的真实对象为 com.xxx.XxxService 不是 org.apache.dubbo.rpc.service.GenericService <img width="2244" height="1556" alt="Image" src="https://github.com/user-attachments/assets/edc24837-01b3-45c3-8349-22b0a78f7af0" /> 然后spring注入bean的时候就会报错。认为类型不对 会报错Unsatisfied dependency expressed through field 'membershipUserTagTestService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'membershipUserTagTestServiceImpl': Unsatisfied dependency expressed through field 'aeMarketingStrategyShowFacadeGeneric'; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'aeMarketingStrategyShowFacadeGeneric' is expected to be of type 'org.apache.dubbo.rpc.service.GenericService' but was actually of type 'com.sun.proxy.$Proxy524' ### Anything else _No response_ ### Do you have a (mini) reproduction demo? - [x] Yes, I have a minimal reproduction demo to help resolve this issue more effectively! ### Are you willing to submit a pull request to fix on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
