Spring Boot Interview Questions: Click Here
Spring Boot Interview Questions: Click Here
Questions
© Copyright by Interviewbit
Contents
19. Can we disable the default web server in the Spring boot application?
20. How to disable a specific auto-configuration class?
21. Explain @RestController annotation in Sprint boot?
22. What is the difference between @RestController and @Controller in Spring
Boot?
23. Describe the flow of HTTPS requests through the Spring Boot application?
24. What is the difference between RequestMapping and GetMapping?
25. What is the use of Profiles in spring boot?
26. What is Spring Actuator? What are its advantages?
27. How to enable Actuator in Spring boot application?
28. What are the actuator-provided endpoints used for monitoring the Spring boot
application?
29. How to get the list of all the beans in your Spring boot application?
30. How to check the environment properties in your Spring boot application?
31. How to enable debugging log in the spring boot application?
32. Where do we define properties in the Spring Boot application?
33. What is dependency Injection?
34. What is an IOC container?
Spring boot provides numbers of starter dependency, here are the most commonly
used -
Data JPA starter.
Test Starter.
Security starter.
Web starter.
Mail starter.
Thymeleaf starter.
Just like any other Java program, a Spring Boot application must have a main
method. This method serves as an entry point, which invokes the
SpringApplication#run method to bootstrap the application.
@SpringBootApplication
public class MyApplication {
SpringApplication.run(MyApplication.class);
// other statements
}
}
<dependency>
<groupId> org.springframework.boot</groupId>
<artifactId> spring-boot-starter-web </artifactId>
</dependency>
-run, -test, -grap, -jar, -war, -install, -uninstall, --init, -shell, -help.
To check the description, run spring --help from the terminal.
<dependency>
<groupId> org.springframework.boot</groupId>
<artifactId> spring-boot-starter-actuator </artifactId>
</dependency>
Health
Info
Beans
Mappings
Configprops
Httptrace
Heapdump
Threaddump
Shutdown
29. How to get the list of all the beans in your Spring boot
application?
Spring Boot actuator “/Beans” is used to get the list of all the spring beans in your
application.
You can define both application and Spring boot-related properties into a file called
application.properties. You can create this file manually or use Spring Initializer to
create this file. You don’t need to do any special configuration to instruct Spring Boot
to load this file, If it exists in classpath then spring boot automatically loads it and
configure itself and the application code accordingly.
Css Interview Questions Laravel Interview Questions Asp Net Interview Questions