Springboot MCQs with answers Page - 21

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

Shyam Dubey • 3.70K Points
Extraordinary

Q. How can you change logging levels for a specific package in Spring Boot?

  • (A) log.level.package=DEBUG
  • (B) log.package.debug=true
  • (C) logging.level.package-name=DEBUG
  • (D) debug.package=true

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation is used to automatically detect and register beans from a package?

  • (A) @EnableScan
  • (B) @ComponentScan
  • (C) @ScanPackages
  • (D) @FindBeans

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which annotation is used to load initial data into the database during startup?

  • (A) @LoadData
  • (B) @EnableSQL
  • (C) @Sql
  • (D) @InitData

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which of these is NOT a valid Spring Boot actuator endpoint?

  • (A) /actuator/info
  • (B) /actuator/logs
  • (C) /actuator/beans
  • (D) /actuator/ui

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What does the property 'management.endpoints.web.exposure.include=*' do?

  • (A) Disables all actuator endpoints
  • (B) Exposes all available actuator endpoints over the web
  • (C) Limits access to specific users
  • (D) Allows access to JMX only

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which property sets the maximum number of connections in a Spring Boot JDBC pool?

  • (A) spring.datasource.max-size
  • (B) jdbc.max.connections
  • (C) spring.datasource.hikari.maximum-pool-size
  • (D) spring.db.connections.max

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What is the default scope of a Spring bean?

  • (A) prototype
  • (B) request
  • (C) singleton
  • (D) session

S

Shyam Dubey • 3.70K Points
Extraordinary

Q. What happens if no profile is set in a Spring Boot application?

  • (A) Application fails to start
  • (B) Spring uses the 'default' profile
  • (C) Spring activates all profiles
  • (D) Spring disables all beans

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