Last active
October 25, 2020 16:30
-
-
Save lofidewanto/664e6a2fb6aeb0b3a5ec9dce678582d4 to your computer and use it in GitHub Desktop.
IndexedDB with Java Patterns - Comparison Dagger2 and Spring Boot Annotations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spring Boot | Dagger2 | Explanation | |
---|---|---|---|
@Configuration | @Module | A class that provides or builds the objects' dependencies | |
@Bean | @Provides | Create the objects | |
@SpringBootApplication | @Component | Interface used to generate the injector for the entry point and serves as a bridge between dependency providers (@Module) and dependency users (@Inject) | |
@Component @Service | @Singleton | Marking the classes to be managed as Singleton by DI framework | |
@Scope | @Singleton or nothing | Scoping the objects | |
@Autowired | @Inject | Inject the object to the marked property or constructor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment