Olete.in
Articles
Mock Tests
🧪 Spring Boot MCQ Quiz Hub
Spring Boot Common Test
Choose a topic to test your knowledge and improve your Spring Boot skills
1. Choose name of annotations @SpringBootApplication annotation is equivalent to using with their default attribute
@Configuration
@EnableAutoConfiguration
@ComponentScan
All above three
2. Springboot enables the developers to us ?
Single Annotation
Multiple Annotations
Both
None
3. Springboot provides?
Loosely coupling features.
Hard coupling features.
Very Hard coupling features.
Tit coupling features.
4. Can we exclude any package without using then basePackages filter ?
Yes
No
Wrong qusetions
Wrong Options
5. Spring Boot provides a trickier option for achieving this without touching the component scan?
Yes
No
6. @SpringBootApplication can used to exclude any package without using basePackage filter?
Yes
No
7. Choose correct Code Snippet used to exclude
@SpringBootApplication(exclude ={Salary. class}) Public class Empo{}
@SpringBootApplication(exclude =={Salary. class}) Public class Empo{}
@SpringBootApplication(include !={Salary. class})
None
8. Can we disable a specific auto-configuration class?
Yes
No
9. How we can disable a specific auto- configuration class?
Using exclude attribute of @EnableAutoConfiguration
Using include attribute of @DisableAutoconfiguration
Using not exclude attribute of @DisabaleAutoConfiguration
Using not include attribute of @EnableAutoConfiguration
10. Syntax for specific auto-configuration classes that we do not want are being applied?
By using "exclude" @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
By using "not include" @EnableAutoConfiguration(enclude!={DataSourceAutoConfiguration.class})
Both
None
11. Syntax for Spring Boot provides the facility to control the list of auto-configuration classes to exclude by using the spring.autoconfigure.exclude property<br> application.properties<br> //By using property file<br><br> spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
true
flase
12. Can we disable the default web server in the Spring Boot application?
Yes
No
13. spring.main.web-application-type=none is use to disable the default web server in the Spring Boot application
true
flase
14. Can we override or replace the Embedded Tomcat server in Spring Boot?
Yes
No
15. Is this possible to change the port of Embedded Tomcat server in Spring boot?
Yes
No
Submit