This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What are the uses of @RequestMapping and @RestController annotations in Spring Boot? |
Answer»
Check out more Interview Questions on Spring Boot here. |
|
| 2. |
Can the default web server in the Spring Boot application be disabled? |
|
Answer» Yes! APPLICATION.properties is used to CONFIGURE the WEB application type, by MENTIONING spring.main.web-application-type=none. |
|
| 3. |
How to disable specific auto-configuration class? |
|
Answer» @EnableAutoConfiguration(exclude = {InterviewBitAutoConfiguration.class}) If the class is not specified on the classpath, we can specify the fully qualified NAME as the VALUE for the excludeName. //By using "excludeName"@EnableAutoConfiguration(excludeName={Foo.class})
|
|
| 4. |
Can you tell how to exclude any package without using the basePackages filter? |
|
Answer» We can use the exclude attribute while USING the ANNOTATION @SpringBootApplication as follows: @SpringBootApplication(exclude= {Student.CLASS})PUBLIC class InterviewBitAppConfiguration {} |
|
| 5. |
Can we change the default port of the embedded Tomcat server in Spring boot? |
Answer»
|
|
| 6. |
What are the possible sources of external configuration? |
Answer»
|
|
| 7. |
What is Spring Boot dependency management system? |
Answer»
|
|
| 8. |
What are the effects of running Spring Boot Application as “Java Application”? |
| Answer» | |
| 9. |
What does @SpringBootApplication annotation do internally? |
|
Answer» As per the Spring Boot documentation, the @SpringBootApplication annotation is one point replacement for USING @Configuration, @EnableAutoConfiguration and @ComponentScan ANNOTATIONS alongside their default attributes. This ENABLES the developer to use a single annotation instead of using multiple annotations THUS lessening the LINES of code. However, Spring provides loosely coupled features which is why we can use these annotations as per our project needs. |
|
| 10. |
What are the features of Spring Boot? |
Answer»
|
|
| 11. |
Differentiate between Spring and Spring Boot. |
Answer»
|
|
| 12. |
Explain the advantages of using Spring Boot for application development. |
Answer»
|
|
| 13. |
What do you understand by the term ‘Spring Boot’? |
|
Answer» Spring Boot is an open-source, java-based FRAMEWORK that provides support for RAPID APPLICATION Development and gives a PLATFORM for developing stand-alone and production-ready spring applications with a need for very few configurations. |
|