apache / apache/dubbo

resolvePackagesToScan modify function

Open
#13,964 2 comments 0 reactions 0 assignees View on GitHub
component/sdk type/discussion
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### 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 feature requirement.

### Apache Dubbo Component

Java SDK (apache/dubbo)

### Descriptions

I hope to modify the resolvePackagesToScan function in the ServiceAnnotationPostProcessor class information to

private Set resolvePackagesToScan(Set packagesToScan) {
Set resolvedPackagesToScan = new LinkedHashSet<>(packagesToScan.size());
for (String packageToScan : packagesToScan) {
if (StringUtils.hasText(packageToScan)) {
String resolvedPackageToScan = environment.resolvePlaceholders(packageToScan.trim());
resolvedPackageToScan=resolvedPackageToScan.replace(",",";");
resolvedPackageToScan=resolvedPackageToScan.replace("\t",";");
resolvedPackagesToScan.addAll(Arrays.asList(resolvedPackageToScan.split(";")));
}
}
return resolvedPackagesToScan;
}

### Related issues

_No response_

### Are you willing to submit a pull request to fix on your own?

- [X] 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)

Contributor guide

Open the contributing guide

Research direction

Start by locating ServiceAnnotationPostProcessor and its resolvePackagesToScan function in the Apache Dubbo Java SDK. Review how package values are currently resolved and separated, then verify handling of the comma- and tab-separated inputs shown in the issue. Done means the function returns the intended package set without losing resolved entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.