Which annotation is primarily used in Spring Boot to mark the main class of your application?
- @MainClass
- @SpringBootApplication
- @SpringBootClass
- @SpringMain
In Spring Boot, the primary annotation used to mark the main class of your application is @SpringBootApplication. This annotation not only marks the class as the main entry point but also enables various Spring Boot features like auto-configuration, component scanning, and more. It's the starting point for your Spring Boot application.
Loading...
Related Quiz
- The _____ file in Spring Boot can be used to define configuration properties in YAML format.
- You are creating a Spring Boot project intended to be deployed on a cloud platform. What considerations and configurations would you implement to ensure smooth deployment and execution on the cloud environment?
- To include Spring MVC in a Spring Boot project, the _____ starter dependency should be added.
- Which of the following annotations is used to handle exceptions globally across the whole application in Spring Boot?
- How can you ensure data integrity between the cache and the underlying data source in a Spring Boot application?