Spring Boot/Spring Boot Common Test Sample Test,Sample questions

Question:
@SpringBootApplication can used to exclude any package without  using basePackage filter?

1.Yes

2.No


Question:
Can we disable a specific auto-configuration class?

1.Yes

2.No


Question:
Can we disable the default web server in the Spring Boot application?

1.Yes

2.No


Question:
Can we exclude any package without using then basePackages filter ?

1.Yes

2.No

3.Wrong qusetions

4.Wrong Options


Question:
Can we override or replace the Embedded Tomcat server in Spring Boot?

1.Yes

2.No


Question:
Choose correct Code Snippet used to exclude

1.@SpringBootApplication(exclude ={Salary. class}) Public class Empo{}

2.@SpringBootApplication(exclude =={Salary. class}) Public class Empo{}

3.@SpringBootApplication(include !={Salary. class})

4.None


Question:
Choose name of annotations @SpringBootApplication annotation is equivalent to  using with their default attribute 

1.@Configuration

2.@EnableAutoConfiguration

3.@ComponentScan

4.All above three


Question:
How we can disable a specific auto- configuration class?

1.Using exclude attribute of @EnableAutoConfiguration

2.Using include attribute of @DisableAutoconfiguration

3.Using not exclude attribute of @DisabaleAutoConfiguration

4.Using not include attribute of @EnableAutoConfiguration


Question:
Is this possible to change the port of Embedded Tomcat server in Spring boot?

1.Yes

2.No


Question:
Spring Boot provides a trickier option for achieving this without touching the component scan?

1.Yes

2.No


Question:
spring.main.web-application-type=none
is use to disable the default web server in the Spring Boot application

1.true

2.flase


Question:
Springboot enables the developers to us ?

1.Single Annotation

2.Multiple Annotations

3.Both

4.None


Question:
Springboot provides?

1. Loosely coupling features.

2.Hard coupling features.

3.Very Hard coupling features.

4.Tit coupling features.


Question:
Syntax for specific auto-configuration classes that we do not want are being applied?

1.By using "exclude" @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

2.By using "not include" @EnableAutoConfiguration(enclude!={DataSourceAutoConfiguration.class})

3.Both

4.None


Question:
Syntax for Spring Boot provides the facility to control the list of auto-configuration classes to exclude by using the spring.autoconfigure.exclude property
application.properties
//By using property file

spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration

1.true

2.flase


More MCQS

  1. Spring Boot Common Test
  2. Spring Boot - Bootstrapping
  3. Spring Boot AOP
  4. Spring Boot - Logging
  5. Spring Boot - Application Properties
  6. Spring Boot - RESTful Web Services
  7. Spring Boot - Exception Handling
  8. Spring Boot - Interceptor
  9. Spring Boot - Servlet Filter
  10. Spring Boot - Tomcat
  11. Spring Boot - File Handling
  12. Spring Boot - Service Components
  13. Spring Boot - Thymeleaf
  14. Spring Boot - CORS
  15. Spring Boot - Internationalization
  16. Spring Boot - Scheduling
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!