apache/dubbo-spring-boot-project

Fix: avoid PropertyResolver bean ambiguity with Sentinel

Bug FixJanuary 24, 2026Open

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

PropertyResolver bean ambiguity when Dubbo is used with Sentinel.

Multiple PropertyResolver beans could be present in the Spring application context when Dubbo was used together with Sentinel, resulting in ambiguous bean resolution during application startup.

Engineering Problem

Understanding the Problem

Dubbo auto-configuration exposed the scan base packages resolver using the generic PropertyResolver type. When another PropertyResolver bean was present, such as Spring's Environment integration in a Sentinel-based application, Spring could encounter bean ambiguity during startup.

Solution

Implementation Approach

Changed the exposed bean type to the more specific DubboScanBasePackagesPropertyResolver and added ConditionalOnMissingBean protection. This removes ambiguity around the generic PropertyResolver type while preserving the intended Dubbo property resolution behaviour.

Technologies

Engineering Stack

JavaSpring BootApache DubboSpring FrameworkSentinelAuto Configuration

Pull Request

View the Contribution

View the pull request and the associated engineering discussion directly on GitHub.

View Pull Request on GitHub →