SpringBoot_MCQ_50Questions_MockTest
SpringBoot_MCQ_50Questions_MockTest
Correct Answer: B
A. @Component
B. @EnableConfiguration
C. @Configuration
D. @EnableAutoConfiguration
Correct Answer: D
A. @ComponentScan
B. @EnableAutoConfiguration
C. @SpringBootConfiguration
Correct Answer: D
A. spring-boot-starter-data-jpa
B. spring-boot-starter-security
C. spring-boot-starter-web
D. spring-boot-starter-thymeleaf
Correct Answer: C
5. Which of the following is a correct dependency for Spring Security in pom.xml?
A. spring-boot-security
B. spring-boot-starter-security
C. spring-starter-security
D. spring-boot-starter-web-security
Correct Answer: B
A. @Controller + @ResponseBody
B. @Service + @Repository
C. @Component + @Bean
D. @Controller + @RequestParam
Correct Answer: A
A. runApp()
B. SpringApp.run()
C. SpringApplication.run()
D. Boot.run()
Correct Answer: C
A. @Inject
B. @Bean
C. @Autowired
D. @Qualifier
Correct Answer: C
B. CREATE
C. GET
D. BUILD
Correct Answer: C
Correct Answer: C
11. Which layer handles the business logic in Spring Boot Architecture?
A. Presentation Layer
B. Business Layer
C. Persistence Layer
D. Database Layer
Correct Answer: B
12. Which annotation is used to map HTTP GET requests in Spring Boot?
A. @PostMapping
B. @PutMapping
C. @GetMapping
D. @DeleteMapping
Correct Answer: C
Correct Answer: C
A. GET
B. POST
C. PUT
D. DELETE
Correct Answer: C
A. @RequestParam
B. @PathVariable
C. @Autowired
D. @ResponseBody
Correct Answer: A
16. Which file is used to manage project dependencies in Spring Boot (Maven)?
A. settings.xml
B. build.gradle
C. pom.xml
D. application.yml
Correct Answer: C
17. Which Spring Boot annotation is used to create RESTful web services?
A. @RestService
B. @RestController
C. @WebService
D. @RestApi
Correct Answer: B
A. Jetty
B. Undertow
C. Tomcat
D. Netty
Correct Answer: C
19. Which annotation is used to map HTTP DELETE requests in Spring Boot?
A. @DeleteRequest
B. @RemoveMapping
C. @DeleteMapping
D. @RemoveRequest
Correct Answer: C
A. config.properties
B. application.properties
C. settings.json
D. app.yml
Correct Answer: B