Sorry For Inconvenience, Site is Under Maintenance. Please Goto HomePage

Spring Boot Framework Fresco Play MCQs Answers

Notes Bureau

Spring Boot Framework Fresco Play MCQs Answers


Disclaimer: The main motive to provide this solution is to help and support those who are unable to do these courses due to facing some issue and having a little bit lack of knowledge. All of the material and information contained on this website is for knowledge and education purposes only.

Try to understand these solutions and solve your Hands-On problems. (Not encourage copy and paste these solutions)


Spring Boot Framework Fresco Play MCQs Answers

Spring - Quiz

1.Which layer of spring boot spans across multiple layers?

  1. Common layer
  2. Service layer
  3. Foundation layer
  4. Web layer

Answer: 3)Foundation layer

2.Which interface implements Destruction callbacks?

  1. DisposableBean
  2. FinalizerBean
  3. DemolishBean
  4. None of the options
  5. DestructorBean

Answer: 1)DisposableBean

3.Which of the following methods performs the initialization of a bean?

  1. initialize
  2. init
  3. constructor
  4. afterPropertiesSet

Answer: 2)init

4.Which method should a bean implement to employ destruction callbacks?

  1. finalize
  2. clear
  3. destroy
  4. clean

Answer: 3)destroy

5.The following are valid techniques to offer configuration metadata to spring container, except ________

  1. XML-based configuration file
  2. Annotation-based configuration
  3. Java-based configuration
  4. JSON-based configuration file

Answer: 4)JSON-based configuration file

6.A session scope scopes the bean definition to an/the ____________

  1. HTTP request
  2. HTTP Application/Global session
  3. HTTP session
  4. Spring IoC container

Answer: 3)HTTP session

7.Which of the following is correct about dependency injection?

  1. It helps in deciding the dependencies of objects.
  2. It stores object states in the file system.
  3. It helps in decoupling application objects from each other.
  4. It stores object states in the database.

Answer: 3)It helps in decoupling application objects from each other.

8.Which interface helps to initialize the bean?

  1. BeanInitializer
  2. InitializingBean
  3. BeanInitializing
  4. InitializerBean

Answer: 2)InitializingBean

9.Which interface implements Destruction callbacks?

  1. FinalizerBean
  2. DemolishBean
  3. DisposableBean
  4. None of the options
  5. DestructorBean

Answer: 3)DisposableBean



Spring Boot - Quiz


1.The default Java compiler level for a Spring boot app is __________

  1. Java 1.8
  2. Java 1.6
  3. Java 1.7
  4. None of the options

Answer: 2)Java 1.6

2.Spring boot application can be executed as a stand-alone jar.

  1. True
  2. False

Answer: 1)True

3.The Java compiler level can be modified for a Maven built Spring boot app using ____________

  1. server.properties
  2. application.properties
  3. pom.xml
  4. web.xml

Answer: 3)pom.xml

4.The annotation to be added to automatically configure beans based on the classes added to the class path is ____________

  1. None of the options
  2. @EnableAutoConfiguration
  3. @AutoConfiguration
  4. @EnableConfiguration

Answer: 2)@EnableAutoConfiguration

5.'Spring-boot-maven-plugin' is added to the pom.xml plugin section to _____________

  1. Package the spring boot application as an executable jar
  2. Build a maven Spring boot application
  3. None of the options
  4. Boot the maven Spring boot application

Answer: 1)Package the spring boot application as an executable jar

6.Executable jar can be created in Spring boot using __________

  1. Gradle build
  2. None of the options
  3. Both the options
  4. Maven build

Answer: 3)Both the options

7.What does SpringApplication.run() do?

  1. Performs class path scan (interprets all annotations in the Spring class)
  2. All the options
  3. Starts Spring Application Context
  4. Default configuration
  5. Starts Tomcat Server

Answer: 2)All the options


Build Systems - Quiz


1.Spring boot starter for a Spring batch application is ____________

  1. Spring-boot-starter-batch
  2. Spring-boot-batch
  3. Spring-starter-batch
  4. None of the options

Answer: 1)Spring-boot-starter-batch

2.Spring boot does not auto configure when a jar dependency is added outside the Starters package.

  1. True
  2. False

Answer: 2)False

3.What is the starter for using log4j2 for logging?

  1. Spring-boot-starter-log4j2
  2. Spring-boot-starter-logger
  3. Spring-boot-starter-log
  4. None of the options

Answer: 1)Spring-boot-starter-log4j2

4.Spring-boot-starter-parent allows to manage __________

  1. Default Plugin Configuration
  2. Configuration - Java Version and other properties
  3. None of the options
  4. Dependency Management - Version of dependencies
  5. All the options mentioned

Answer: 5)All the options mentioned

5.Dependencies cannot be added to the Gradle build system in Spring boot.

  1. True
  2. False

Answer: 2)False


Configuration - Quiz


1.Which annotation is used to bind application properties to the class fields?

  1. @AppProperties
  2. @ApplicationProperties
  3. None of the options
  4. @ConfigurationProperties

Answer: 4)@ConfigurationProperties

2.Specific Auto-Configuration classes cannot be disabled in Spring.

  1. True
  2. False

Answer: 2)False

3.@ConditionalOnClass({ DataSource.class, EmbeddedDatabaseType.class }) This configuration is only enabled when ________

  1. Class in present in the classpath
  2. Any of the options
  3. Java version 1.8 or above is used
  4. Maven is being used
  5. None of the options

Answer: 1)Class in present in the classpath

4.Auto-configuration report can be logged to the console by enabling debug mode while starting the application.

  1. False
  2. True

Answer: 2)True

5.The annotation used to import additional configuration classes is ___________

  1. @Include
  2. None of the options
  3. @EnableImport
  4. @Import
  5. Any of the options

Answer: 4)@Import


Spring Boot - Final Assessment


1.What is the scope for business service class in Spring MVC?

  1. Singleton
  2. request
  3. Prototype
  4. session

Answer: 1)Singleton

2.What is the role of ApplicationContextAware in Spring?

  1. To make bean aware on the container
  2. To perform Dependency injection

Answer: 1)To make bean aware on the container

3.What is the Starter that can be used to add spring boot dependency jars for a spring boot application?

  1. Spring-boot-parent
  2. Spring-boot-starter-parent
  3. Spring-boot-starter-web
  4. Any of the options

Answer: 2)Spring-boot-starter-parent

4.mvn dependency:tree command is used to print tree representation of project alone.

  1. True
  2. False

Answer: 2)False

5.The annotation to be added to automatically configure beans based on the classes added to the class path is ____________

  1. @AutoConfiguration
  2. @EnableAutoConfiguration
  3. @EnableConfiguration
  4. None of the options

Answer: 2)@EnableAutoConfiguration

6.@RequestMapping annotation is used to map a HTTP request method (GET or POST) to a specific class or method in the controller which will handle the respective request.

  1. False
  2. True

Answer: 2)True

7.After adding a starter to the pom.xml, we are free to pick and choose jar dependencies outside the starter.

  1. True
  2. False

Answer: 1)True

8.<java.version>1.8</java.version> is added under _________

  1. build
  2. dependencies
  3. properties
  4. plugins

Answer: 3)properties

9.Spring boot Actuator can be used to view ___________

  1. None of the options
  2. All the options mentioned
  3. Application bean configuration details
  4. Registered Health Check Metrics
  5. Application URL Mappings, Environment details and configuration parameter values

Answer: 2)All the options mentioned

10.The Gradle command to run a Spring boot executable app is ___________

  1. Gradle springBootRun
  2. gradle bootRun
  3. gradle run
  4. None of the options

Answer: 2)gradle bootRun

11.The Maven command to run a Spring boot application is __________

  1. mvn spring-boot:run
  2. maven spring-boot:run
  3. Mvn spring: run
  4. None of the options

Answer: 1)mvn spring-boot:run

12.The HTTP method to update a particular resource in Spring MVC is _____________

  1. Put
  2. None of the options
  3. Get
  4. Post

Answer: 1)Put

13.What is the default nature of the Beans defined in spring framework?

  1. None of the options
  2. Initialized
  3. Abstract
  4. Singleton
  5. Final

Answer: 4)Singleton

14.The property to set the host server port in Spring app is ____________

  1. host.port
  2. port name
  3. server.port
  4. server.portName

Answer: 3)server.port

15.The embedded server that starts up with the Spring boot application is ____________

  1. None of the options
  2. Tomcat server
  3. Weblogic server
  4. Server has to be configured

Answer: 2)Tomcat server

16.What is the scope of stateless bean in Spring?

  1. Request
  2. Singleton scope
  3. Session
  4. Prototype scope

Answer: 2)Singleton scope

17.Executable jar can be created in Spring boot using ______________

  1. Both the options
  2. Maven build
  3. None of the options
  4. Gradle build

Answer: 1)Both the options

18.The @Controller annotation indicates ____________

  1. How to control the dependency injection.
  2. How to control the transaction management.
  3. How to control the aspect programming.
  4. That a particular class serves the role of a controller.

Answer: 1)That a particular class serves the role of a controller.

19.For which of the following criteria can Spring boot auto configuration be done?

  1. Absence of configuration file
  2. Presence or absence of a Spring Bean
  3. Presence of a System Property
  4. All the options
  5. Availability of a particular class in classpath

Answer: 4)All the options

20.Which of the following layers the @Controller annotation is used in?

  1. Business layer
  2. Session layer
  3. Presentation layer
  4. None of the options
  5. Service layer

Answer: 3)Presentation layer

21.Spring boot follows Opinionated Defaults Configuration approach to reduce developer effort.

  1. True
  2. False

Answer: 1)True

22.How to get the object of DAO in spring framework?

  1. Using Spring Dependency injection
  2. Using new keyword

Answer: 1)Using Spring Dependency injection

23.@RequestMapping annotation is used to map a HTTP request method (GET or POST) to a specific class or method in the controller which will handle the respective request.

  1. True
  2. False

Answer: 1)True

24.By default, a bean is eagerly initialized in spring.

  1. True
  2. False

Answer: 1)True


If you want answers to any of the fresco play courses feel free to ask in the comment section, we will surely help.

Post a Comment

Any comments and suggestion will be appreciated.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.

Join Telegram Channel

Join Notes Bureau Lets Teach and Learn

Join Telegram Channel
CLOSE ADS
CLOSE ADS