Spring Boot Quiz (Set 17) Spring Boot (Set 7) 1 / 10 What is the purpose of the '@Service' annotation in Spring? To indicate that a class is a service component To mark a class as a primary candidate for injection To define the scope of a bean To handle request mappings 2 / 10 Which annotation is used to mark a class as a Spring Boot application? @MainApp @Bootable @SpringApp @SpringBootApplication 3 / 10 What is the purpose of the '@ComponentScan' annotation in Spring? To configure application properties To enable component scanning and auto-discovery of Spring beans To specify the base package for REST controllers To define a new bean instance 4 / 10 In Spring Boot, how can you specify the port on which the embedded web server listens? By annotating the main application class with '@Port' By creating a new Maven profile By specifying it in the build.gradle file By setting the 'server.port' property in application.properties (or application.yml) 5 / 10 What does the term 'IoC' stand for in Spring Framework? Input or Control Interchange of Classes Inversion of Control Internal of Components 6 / 10 What is the purpose of the '@Qualifier' annotation in Spring? To specify which bean to inject when multiple beans of the same type exist To define the scope of a bean To mark a bean as primary To create a new instance of a bean 7 / 10 In Spring Security, what is the purpose of a UserDetails object? To define URL mappings for various roles To store the user's session data To represent the user's security information and roles To handle user authentication 8 / 10 What is the primary purpose of the Spring Boot Actuator? To generate REST API documentation To optimize database queries To automate code deployment To provide production-ready features for monitoring and managing Spring Boot applications 9 / 10 Which annotation is used to enable validation in Spring MVC? @Validation @EnableValidation @Valid @Validated 10 / 10 What is the purpose of the '@RequestMapping' annotation in Spring MVC? To define a configuration property To map a method to a specific HTTP request To declare a bean in the application context To specify a transaction boundary Your score isThe average score is 0% 0% Restart quiz