Springboot MCQs with answers Page - 24

Here, you will find a collection of MCQ questions on Springboot. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

S

Satya • 3.38K Points
Extraordinary

Q. What does @PathVariable do?

  • (A) Reads URL path values
  • (B) Reads database values
  • (C) Reads headers
  • (D) Reads cookies

S

Satya • 3.38K Points
Extraordinary

Q. What does @RequestParam do?

  • (A) Reads query parameters from URL
  • (B) Reads database parameters
  • (C) Reads headers only
  • (D) Reads cookies only

S

Satya • 3.38K Points
Extraordinary

Q. Which file manages Maven dependencies in Spring Boot?

  • (A) pom.xml
  • (B) build.gradle
  • (C) settings.xml
  • (D) config.xml

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used for global exception handling?

  • (A) @ExceptionHandler
  • (B) @ControllerAdvice
  • (C) @ErrorHandler
  • (D) @CatchException

S

Satya • 3.38K Points
Extraordinary

Q. Spring Boot uses which ORM tool by default with JPA?

  • (A) MyBatis
  • (B) Hibernate
  • (C) JDBC only
  • (D) MongoDB

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation indicates a controller that returns views (HTML)?

  • (A) @RestController
  • (B) @Controller
  • (C) @Service
  • (D) @Component

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used to enable scheduling in Spring Boot?

  • (A) @EnableScheduling
  • (B) @Schedule
  • (C) @EnableCron
  • (D) @StartSchedule

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation schedules a method to run periodically?

  • (A) @Scheduled
  • (B) @Timer
  • (C) @Repeat
  • (D) @Run

S

Satya • 3.38K Points
Extraordinary

Q. Spring Boot DevTools is used for?

  • (A) Production deployment
  • (B) Automatic restart and development convenience
  • (C) Security only
  • (D) Database backup

S

Satya • 3.38K Points
Extraordinary

Q. Which annotation is used to validate request body objects?

  • (A) @Valid
  • (B) @Check
  • (C) @Verify
  • (D) @ValidateRequest

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ