Spring Framework Interview Questions Flashcards
What is Spring Framework?
https://training.javatpoint.com/important-features-of-spring-framework
Features of Spring Framework
https://training.javatpoint.com/important-features-of-spring-framework
What is a Spring Configuration File?
https://www.careerride.com/Spring-configuration-file.aspx#google_vignette
Question 3 from
https://www.interviewbit.com/spring-interview-questions/?sign_up_medium=ib_article_auth_blocker/
Spring – Understanding Inversion of Control with Example
https://www.geeksforgeeks.org/spring-understanding-inversion-of-control-with-example/
What do you understand by Dependency Injection?
https://www.geeksforgeeks.org/spring-dependency-injection-with-example/
Explain the difference between constructor and setter injection?
https://www.geeksforgeeks.org/spring-dependency-injection-with-example/
What are Spring Beans?
https://stackoverflow.com/questions/17193365/what-in-the-world-are-spring-beans/17193458#17193458
How is the configuration meta data provided to the spring container?
https://www.freetimelearning.com/software-interview-questions-and-answers.php?How-is-the-configuration-meta-data-provided-to-the-spring-container?&id=2164
How is the configuration meta data provided to the spring container?
https://www.freetimelearning.com/software-interview-questions-and-answers.php?How-is-the-configuration-meta-data-provided-to-the-spring-container?&id=2164
What are the bean scopes available in Spring?
https://www.tutorialspoint.com/spring/spring_bean_scopes.htm
Question 25 from
https://www.turing.com/interview-questions/spring-boot
Explain Bean life cycle in Spring Bean Factory Container.
https://www.edureka.co/community/17617/bean-life-cycle-in-spring-bean-factory-container
Question 10 from
https://www.interviewbit.com/spring-interview-questions/?sign_up_medium=ib_article_auth_blocker/#
What do you understand by Bean Wiring.
https://www.quora.com/What-is-bean-wiring-in-Spring-in-Java
What is autowiring and name the different modes of it?
https://www.geeksforgeeks.org/spring-autowiring/
What are the limitations of autowiring?
Question 13
https://www.interviewbit.com/spring-interview-questions/?sign_up_medium=ib_article_auth_blocker/#
What is Springboot
https://www.tutorialspoint.com/spring_boot/spring_boot_introduction.htm
Springboot interview question no 1
https://www.interviewbit.com/spring-interview-questions/?sign_up_medium=ib_article_auth_blocker/#
Explain the advantages of using Spring Boot for application development.
Spring Boot helps to create stand-alone applications which can be started using java.jar (Doesn’t require configuring WAR files).
Spring Boot also offers pinpointed ‘started’ POMs to Maven configuration.
Has provision to embed Undertow, Tomcat, Jetty, or other web servers directly.
Auto-Configuration: Provides a way to automatically configure an application based on the dependencies present on the classpath.
Spring Boot was developed with the intention of lessening the lines of code.
It offers production-ready support like monitoring and apps developed using spring boot are easier to launch.
Differentiate between Spring and Spring Boot.
https://www.geeksforgeeks.org/difference-between-spring-and-spring-boot/
Intermediate Question 1 from
https://www.turing.com/interview-questions/spring-boot
What are the features of Spring Boot?
https://docs.spring.io/spring-boot/docs/2.4.x/reference/html/spring-boot-features.html
https://www.interviewbit.com/spring-boot-interview-questions/
What does @SpringBootApplication annotation do internally?
https://www.linkedin.com/pulse/understanding-springbootapplication-annotation-spring-punyakeerthi-bl-z1u5c?utm_source=share&utm_medium=member_ios&utm_campaign=share_via
What are the effects of running Spring Boot Application as “Java Application”?
The application automatically launches the tomcat server as soon as it sees that we are running a web application
What is Spring Boot dependency management system?
https://www.geeksforgeeks.org/spring-boot-dependency-management/#:~:text=Dependency%20is%20nothing%20but%20a,dependencies%20supremely%20easy%20for%20us.
What are the possible sources of external configuration?
Spring Boot allows the developers to run the same application in different environments by making use of its feature of external configuration. This uses environment variables, properties files, command-line arguments, YAML files, and system properties to mention the required configuration properties for its corresponding environments. Following are the sources of external configuration:
Command-line properties – Spring Boot provides support for command-line arguments and converts these arguments to properties and then adds them to the set of environment properties.
Application Properties – By default, Spring Boot searches for the application properties file or its YAML file in the current directory of the application, classpath root, or config directory to load the properties.
Profile-specific properties – Properties are loaded from the application-{profile}.properties file or its YAML file. This file resides in the same location as that of the non-specific property files and the {profile} placeholder refers to an active profile or an environment.
Question 9 from
https://www.turing.com/interview-questions/spring-boot
Can we change the default port of the embedded Tomcat server in Spring boot?
Yes, we can change it by using the application properties file by adding a property of server.port and assigning it to any port you wish to.
For example, if you want the port to be 8081, then you have to mention server.port=8081. Once the port number is mentioned, the application properties file will be automatically loaded by Spring Boot and the specified configurations will be applied to the application.
Can you tell how to exclude any package without using the basePackages filter?
We can use the exclude attribute while using the annotation @SpringBootApplication as follows:
@SpringBootApplication(exclude= {Student.class})
public class InterviewBitAppConfiguration {}