spring-projects / spring-projects/spring-framework
Scan annotated configuration class package by default when using `@ImportHttpServices` without attributes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
Currently, on Spring Framework 7.0.6 and Spring Boot 4.0.5, if I want to register all HTTP Service Clients in a Spring Boot application (in the current package and/or subpackages), I annotate the application class like the following:
@SpringBootApplication
@ImportHttpServices(basePackageClasses = Application.class)
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
When @ImportHttpServices is declared without additional attributes, would it be possible to scan the package and subpackages of the annotated configuration class by default?
Conceptually similar to how @EnableJpaRepositories works today.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the @ImportHttpServices annotation and the Application configuration example, comparing the no-attribute case with basePackageClasses. Determine how the annotated configuration class's package and subpackages should be selected; done means clients in that scope are registered by default without additional attributes, with coverage for the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100