apache/dubbo-spring-boot-project
Fix: avoid PropertyResolver bean ambiguity with Sentinel
Contribution Overview
The Engineering Context
This contribution was made to the apache/dubbo-spring-boot-projectopen-source repository. The work involved understanding the existing codebase, identifying the underlying engineering problem, implementing a focused solution, and validating the change against the project's existing behaviour and testing standards.
Original Issue
Application startup failure caused by multiple PropertyResolver beans with Sentinel.
When Dubbo was used together with Sentinel, multiple PropertyResolver beans could be present in the application context, creating bean ambiguity and causing application startup failures.
Engineering Problem
Understanding the Problem
Dubbo auto-configuration exposed a generic PropertyResolver bean that conflicted with Spring's Environment PropertyResolver when Sentinel was also present. The multiple beans created ambiguity during dependency injection and could prevent the application from starting.
Solution
Implementation Approach
Narrowed the exposed bean type from the generic PropertyResolver interface to DubboScanBasePackagesPropertyResolver. This removes the bean ambiguity, prevents the startup failure when Dubbo and Sentinel are used together, and better aligns the auto-configuration with Spring Boot practices.
Technologies
Engineering Stack
Pull Request
View the Contribution
View the pull request and the associated engineering discussion directly on GitHub.
View Pull Request on GitHub →