TCS WINGS 1 T4 SPRING BOOT SET 9
Rahul Vijayan
Follow for more updates
TCS WINGS 1 T4 SPRING BOOT SET 9
You want to implement logging at different levels in your Spring Boot application. Which configuration file would you modify?
Options:
A) application.properties
B) logback.xml
C) Both A and B
D) Spring Boot does not support logging configuration
Answer:
C) Both A and BYou want to implement a custom authentication entry point in your Spring Security configuration. What class should you implement?
Options:
A) AuthenticationEntryPoint
B) AuthenticationProvider
C) UserDetailsService
D) SecurityConfigurer
Answer:
A) AuthenticationEntryPointYou want to set up an embedded database for testing in your Spring Boot application. Which database could you use?
Options:
A) H2
B) HSQLDB
C) Both A and B
D) Spring Boot does not support embedded databases
Answer:
C) Both A and BYou need to implement a centralized configuration for multiple microservices. What would you typically use?
Options:
A) Spring Cloud Config
B) Eureka
C) Consul
D) Both A and C
Answer:
A) Spring Cloud ConfigYou want to configure a microservice to communicate with another service using REST. What library would you typically use?
Options:
A) Feign
B) RestTemplate
C) Both A and B
D) Spring Boot does not support REST communication
Answer:
C) Both A and BYou need to create a custom health check for your application. Which interface would you implement?
Options:
A) HealthIndicator
B) HealthCheck
C) CustomHealth
D) Both A and B
Answer:
A) HealthIndicatorYou want to set up a job to run periodically in your Spring Boot application. Which annotation would you use?
Options:
A) @Scheduled
B) @EnableScheduling
C) Both A and B
D) Spring Boot does not support scheduled tasks
Answer:
C) Both A and BYou want to create a custom exception handler in your Spring Boot application. What annotation would you use?
Options:
A) @ControllerAdvice
B) @RestController
C) @ExceptionHandler
D) Both A and C
Answer:
D) Both A and CYou need to implement API rate limiting in your Spring Boot application. Which library would you typically use?
Options:
A) Resilience4j
B) Spring Cloud Gateway
C) Both A and B
D) Rate limiting is not supported in Spring Boot
Answer:
C) Both A and BYou want to implement user authentication using OAuth2. Which class would you extend?
Options:
A) AuthorizationServerConfigurerAdapter
B) ResourceServerConfigurerAdapter
C) Both A and B
D) OAuth2 is not supported in Spring Boot
Answer:
C) Both A and B

Comments
Post a Comment