Spring Framework Annotations

Spring Framework - 14 Cards
Click here to toggle all cards
@Configuration
Indicates that a class declares one or more Bean methods that generate bean definitions
@ComponentScan
Define specific packages to scan for components
@Bean
Indicates that a method produces a bean to be managed by the Spring container
@Component
Indicates an annotated class is a component
@Service
Indicates an annotated class has business logic
@Controller
Indicates an annotated class is a web controller
@Repository
Indicates an annotated class manipulates data in a database
@Primary
Gives preference to a bean for autowiring
@Qualifier
Used on a field or parameter as a qualifier for candidate beans when autowiring
@Lazy
Indicates that a bean has to be lazily initialized
@PostConstruct
Identifies the method executed after dependency injection for initialization
@PreDestroy
Receives callback notification for removal of an instance from Spring container
@Named
CDI annotation similar to @Component
@Inject
CDI annotation similar to @Autowired