Skip to content

Instantly share code, notes, and snippets.

@lofidewanto
Last active October 25, 2020 16:30
Show Gist options
  • Save lofidewanto/664e6a2fb6aeb0b3a5ec9dce678582d4 to your computer and use it in GitHub Desktop.
Save lofidewanto/664e6a2fb6aeb0b3a5ec9dce678582d4 to your computer and use it in GitHub Desktop.
IndexedDB with Java Patterns - Comparison Dagger2 and Spring Boot Annotations
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