1. Annotation Basics
2. Annotations to create a Bean
3. Configuration Annotations
4. Spring Boot Specific Annotations
5. Links to Other Annotations
6. Where can we use Annotations
7. Annotation on Bean Properties
8. Spring Boot MVC Annotations
9. Spring Boot REST Annotations
10. Spring Boot Security Annotations
11. Spring Boot AOP Annotations
12. Spring Boot Exception Annotations
13. Spring Boot Transaction Annotations
14. Spring Boot Scheduling Annotations

Spring Boot Annotations With Examples

Prior to Annotations, the Spring Framework’s configuration was largely dependent on XMLs. Using XML configurations was not only a tedious process, but also an error-prone. If you committed any syntactical mistake in XML, sometimes it takes time to fix. But now-a-days annotations, particularly Spring Boot Annotations provide us remarkable capabilities in configuring Spring Framework’s behavior. Moreover, Annotations caused major changes in programming style and slowly making the XML-based configurations outdated. The Java Programming introduced support for Annotations from JDK 1.5.

However Spring Framework started supporting annotations from the release 2.5. Of course, we are going to discuss about Spring Boot Annotations With Examples and their applications.

Here in this article on ‘Spring Boot Annotations With Examples’, we will discuss about all annotations that we use in a Spring Boot Application. Annotations which are not part of this article, will be included in other respective articles. Link will be provided here only for easy navigation. In addition, you can also check one more article ‘Annotations in Java‘.

Annotations on Bean Properties

@Lazy @Profile @Scope @Order @DependsOn
@Primary @Conditional

Annotations on Bean Injection

@Autowired @Resource @Inject @Qualifier
@Primary vs @Qualifier

Annotations on Bean State

@PostConstruct @PreDestroy



Spring Boot Bean Annotations With Examples

In this article we will discuss on ‘Spring Boot Bean Annotations with Examples’. Needless to say, these annotations play a crucial role in creating basic as well as enterprise level Spring Boot Applications. If you want to learn all annotations which are generally used in a Spring Boot Project, kindly visit our article ‘Spring Boot Annotations with Examples‘. Let’s discuss about ‘Spring Boot Bean Annotations with Examples’ here only.

Spring Boot MVC Annotations

@Controller @GetMapping @RequestMapping
@CrossOrigin @PostMapping @ModelAttribute
@RequestParam

Spring Boot REST Annotations

@RestController @GetMapping @PostMapping
@PathVariable @PatchMapping @PutMapping
@DeleteMapping @ResponseBody @RequestBody

Spring Boot MVC & REST Annotations With Examples

In this article, we will discuss on ‘Spring Boot MVC & REST Annotations With Examples’. Needless to say, these annotations are very important for creating a web application in Spring Boot. If you want to learn all annotations which are generally used in a Spring Boot Project, kindly visit our article ‘Spring Boot Annotations with Examples‘. Let’s discuss about ‘Spring Boot MVC & REST Annotations With Examples’ here only.

Annotations on Spring Boot Security

@EnableWebSecurity | @EnableGlobalMethodSecurity
@Secured @RolesAllowed
@PreAuthorize @PostAuthorize

Annotations on Spring Boot Scheduling

@EnableScheduling @Scheduled @Schedules

Annotations on Spring Boot Transaction

@EnableTransactionManagement @Transactional

Spring Boot Security-Scheduling-Transactions Annotations With Examples

In this article, we will discuss on ‘Spring Boot Security-Scheduling-Transactions Annotations With Examples’. Needless to say, these annotations play a crucial role in creating a web application in Spring Boot. If you want to learn all annotations which are generally used in a Spring Boot Project, kindly visit our article ‘Spring Boot Annotations with Examples‘. Let’s discuss about ‘Spring Boot Security-Scheduling-Transactions Annotations With Examples’ here only.

Annotations on Spring Boot Errors & Exceptions

@ResponseStatus @ExceptionHandler
@ControllerAdvice @RestControllerAdvice


Annotations on Spring Boot AOP

@EnableAspectJAutoProxy
@Aspect @Pointcut
@Before @After
@AfterReturning @AfterThrowing

Spring Boot Errors And AOP Annotations With Examples

In this article we will discuss on ‘Spring Boot Errors and AOP Annotations with Examples’. Needless to say, these annotations play a crucial role in creating Spring Boot Applications. If you want to learn all annotations which are generally used in a Spring Boot Project, kindly visit our article ‘Spring Boot Annotations with Examples‘. Let’s discuss about ‘Spring Boot Errors and AOP Annotations with Examples’ here only.