Spring Boot Quiz (Set 15) Spring Boot (Set 5) 1 / 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 handle user authentication To represent the user's security information and roles 2 / 10 What does the Spring Boot Starter Parent provide to your project? Default configuration and dependency management A set of predefined REST endpoints A UI framework for web applications A database connection pool 3 / 10 Which annotation is used to define a bean in Spring? @Component @Bean @Service @Instance 4 / 10 What is the purpose of the Spring Boot CommandLineRunner? To handle command-line arguments for the application To execute specific code after the Spring Boot application starts To manage database transactions To define custom REST endpoints 5 / 10 Which annotation is used to define a component as a candidate for autowiring? @Autowired @Component @Service @ComponentScan 6 / 10 In Spring Boot, what is the purpose of the 'application.properties' (or 'application.yml') file? To store database records To configure the application properties To define REST API endpoints To store static resources 7 / 10 What is the purpose of the '@Service' annotation in Spring? To mark a class as a primary candidate for injection To indicate that a class is a service component To define the scope of a bean To handle request mappings 8 / 10 What is the primary purpose of Spring Boot Actuator? To generate API documentation To optimize database queries To provide production-ready features for monitoring and managing Spring Boot applications To automate code deployment 9 / 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) 10 / 10 What is the purpose of the '@PostMapping' annotation in Spring MVC? To map a method to an HTTP POST request To define a new bean instance To specify a transaction isolation level To handle exception mappings Your score isThe average score is 0% 0% Restart quiz