TCS WINGS 1 T4 SPRING BOOT SET 8

Rahul Vijayan
Follow for more updates

TCS WINGS 1 T4 SPRING BOOT SET 8

  • You want to define a RESTful API endpoint in your Spring Boot application. What annotation would you use?
    Options:
    A) @RestController
    B) @Controller
    C) @Service
    D) @Component
    Answer:
    A) @RestController

  • You want to enable asynchronous processing in your Spring Boot application. What annotation would you use?
    Options:
    A) @EnableAsync
    B) @Async
    C) Both A and B
    D) Spring Boot does not support asynchronous processing
    Answer:
    C) Both A and B

  • You need to configure your Spring Boot application to connect to an Oracle database. What dependency would you add?
    Options:
    A) oracle.jdbc
    B) spring-boot-starter-data-jpa
    C) Both A and B
    D) Spring Boot does not support Oracle
    Answer:
    C) Both A and B

  • You want to manage distributed configuration in your microservices. Which tool would you typically use?
    Options:
    A) Spring Cloud Config
    B) Consul
    C) Both A and B
    D) Distributed configuration is not supported in Spring Boot
    Answer:
    A) Spring Cloud Config

  • You want to implement circuit breaking in your microservices. Which library would you typically use?
    Options:
    A) Hystrix
    B) Resilience4j
    C) Both A and B
    D) Circuit breaking is not supported in Spring Boot
    Answer:
    C) Both A and B

  • You need to add Swagger UI to your Spring Boot application. What dependency would you add?
    Options:
    A) springfox-swagger-ui
    B) springfox-swagger2
    C) Both A and B
    D) Swagger UI is not supported in Spring Boot
    Answer:
    C) Both A and B

  • You want to implement logging in your Spring Boot application. What framework is included by default?
    Options:
    A) Logback
    B) Log4j
    C) SLF4J
    D) All of the above
    Answer:
    A) Logback

  • You need to implement a service that retrieves data from an external API. Which Spring Boot feature would you use?
    Options:
    A) RestTemplate
    B) WebClient
    C) Both A and B
    D) Spring Boot does not support external API calls
    Answer:
    C) Both A and B

  • You want to use Spring Boot's built-in caching mechanism. Which annotation would you use to cache a method result?
    Options:
    A) @Cacheable
    B) @CachePut
    C) @CacheEvict
    D) All of the above
    Answer:
    A) @Cacheable

  • You need to implement session management in your Spring Boot application. What annotation would you use?
    Options:
    A) @EnableWebSecurity
    B) @EnableScheduling
    C) @SessionScope
    D) Spring Boot does not support session management
    Answer:
    A) @EnableWebSecurity

Comments

Popular posts from this blog

T4 Spring boot wings 1

TCS WINGS 1 T4 SPRING BOOT SET 10

TCS WINGS 1 T4 SPRING BOOT SET 4