Answer: Spring Boot is an opinionated framework that simplifies the development of Spring applications by providing defaults and convention-over-configuration. It eliminates the need for manual configuration and reduces boilerplate code.
Answer: You can create a Spring Boot application using Spring Initializr or by manually configuring the necessary dependencies and settings.
Answer: Advantages include simplified configuration, automatic dependency management, embedded servers, production-ready features, and seamless integration with other Spring projects.
Answer: Spring Boot uses class path scanning and introspection to automatically configure beans based on the dependencies present in the class path.
Answer: You can use the @Conditional annotation to conditionally enable or disable auto-configuration for specific beans or components.
Answer: @RestController is a specialized version of the @Controller annotation used for RESTful APIs. It combines @Controller and @ResponseBody.
Answer: Spring Boot supports various configuration sources like properties files, YAML files, environment variables, and command-line arguments.
Answer: Spring Data JPA is a subproject of Spring that provides an abstraction layer over JPA for simplified data access and reduces boilerplate code.
Answer: It is used to specify application-specific configurations like database settings, server port, logging levels, etc.
Answer: By adding the @EnableCaching annotation to the application's configuration class and configuring a caching provider.
Answer: Spring Boot Actuator provides built-in production-ready features like health checks, metrics, monitoring endpoints, and application management.
Answer: By using the @ExceptionHandler annotation to handle specific exceptions, or by implementing a custom exception handler using the @ControllerAdvice annotation.
Answer: @Autowired is used to inject dependencies automatically, reducing manual bean wiring in Spring applications.
Answer: Spring Security provides authentication, authorization, and other security features to secure Spring Boot applications.
Answer: By using the @Scheduled annotation on a method, along with specifying the scheduling parameters like fixed rate, cron expression, etc.
Answer: By adding the @CrossOrigin annotation to a controller method or globally configuring CORS using the WebMvcConfigurer interface.
Answer: The Spring Boot Starter parent POM provides default configurations and dependency management for Spring Boot projects.
Answer: By using the MultipartFile class and the @RequestParam annotation to receive files in controller methods.
Answer: By using the @Transactional annotation on methods or classes that require transactional behavior.
Answer: By configuring the server with an SSL certificate and enabling HTTPS in the application.properties or application.yml file.
Answer: It is used to bootstrap and launch a Spring Boot application.
Answer: By using message resource bundles and the Message Source interface for managing localized messages.
Answer: It provides information about the application's health status, indicating if it is up and running or experiencing issues.
Answer: Spring Boot applications can be deployed as standalone JAR files or as part of a WAR file to a web server or cloud platform.
Answer: Spring Boot Actuator provides endpoints to monitor application metrics, including memory usage, CPU, and database queries. Tools like Visual and Profiler can be used for in-depth profiling and optimization.