google / google/guice

@Component annotation to detect the class like in Springboot

Open
#1,264 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

As many people surely know SpringBoot has an @Component annotation to detect a class is a great feature, but I would like to have it implemented in Guice.

I once developed a small example of what it looks like when a component is scanned.
[Click here](https://github.com/manuelkollus/amber/blob/develop/src/main/java/io/github/manuelkollus/amber/util/ComponentScanner.java)

I would consider this feature appropriate, because you can scan and filter out all classes if the class has @Config annotation, for example, and then inject the class automatically.

Cheers,
Manuel Kollus

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.