Spring boot QA
Spring boot QA
Core Concepts
Practical Scenarios
Optional Questions
4. How would you implement logging in a Spring Boot application?
* Use the `logging.level` property to configure logging levels.
* Use logging frameworks like Logback or SLF4J to log messages.
* Customize log formats and appenders.
5. How would you deploy a Spring Boot application to a cloud platform like AWS or
GCP?
* Create a deployment package (JAR or WAR).
* Configure the cloud platform's deployment environment.
* Use tools like AWS Elastic Beanstalk or GCP App Engine to deploy the
application.
Core Annotations
1. @SpringBootApplication`:
This is a composite annotation that includes`@Configuration`
@EnableAutoConfiguration, and `@ComponentScan`. It's the
primary annotation used to start a Spring Boot application.
@SpringBootConfiguration`:
This annotation is a specialization of `@Configuration` for
Spring Boot applications.
@EnableAutoConfiguration`:
This annotation tells Spring Boot to automatically configure
Spring beans based on the classes on the classpath.
@ComponentScan`:
This annotation scans for components, services, repositories,
and controllers classes for bean creation.