SpringBoot_Flashcards
SpringBoot_Flashcards
Q: What is Spring Boot? How does it differ from the traditional Spring Framework?
A: Spring Boot is an open-source Java-based framework used to build standalone and production-ready
Spring applications. Unlike traditional Spring, Spring Boot reduces boilerplate code, provides
- Starter dependencies
- Minimal configuration
Q: What are some advantages of using Spring Boot over Spring MVC?
A: - No need for XML config
- Faster development
- Microservices: Each service is independent, loosely coupled, and can be deployed separately.
Q: What is @SpringBootApplication?
A: It is a convenience annotation that combines @Configuration, @EnableAutoConfiguration, and
@Controller is used for traditional web applications that return views (HTML/JSP).
projects.
spring-boot-starter-data-jpa, spring-boot-starter-security.
server.
Spring Boot Flashcards - Viva Prep
Q: What HTTP methods are commonly used in REST APIs and what do they represent?
A: - GET: Read data
@ResponseBody.
count().
Q: How would you create a REST endpoint that returns a list of students?
A: Create a @RestController, use @GetMapping("/students"), and return List<Student> from the handler
method.
to provide defaults.