Frequently asked Java Spring Real Time interview questions for Spring framework 2024

Опубликовано: 19 Октябрь 2024
на канале: technoUpdate
80
6

Frequently asked interview questions for Spring framework?

1. Spring Overview

1.1 What is Spring?

1.2 What are important features and advantages of Springs?

1.3 What is Spring IoC Container?

1.4 What are the common implementations of the ApplicationContext?

1.5 What is the difference between Bean Factory and ApplicationContext?

2. Dependency Injection

2.1 What are the types of Dependency Injection supported by Spring?

2.2 Which DI would you suggest Constructor-based or setter-based DI?

2.3 Spring Beans

2.4 What are Spring beans?

2.5 What are the different bean scopes does Spring support?

2.6 What is Bean lifecycle in Spring framework?

2.7 What are different ways to configure a class as Spring Bean?

2.8 Are Singleton beans thread safe in Spring Framework?

2.9 What are inner beans in Spring?

2.10 How to inject a Java Collection in Spring?

2.11 Explain different modes of auto wiring?

2.12 What are the limitations with autowiring?

2.13 Is it possible to inject null and empty string values in Spring?

2.14 How to get ServletContext and ServletConfig object in a Spring Bean?

3. Spring Annotations

3.1 What is Spring Java-Based Configuration? Give some annotation example.

3.2 What is Annotation-based container configuration?

3.3 How do you turn on annotation wiring?

3.4 Whats is the purpose of @Required, @Autowaired & @Qualifier annotations ?

3.5 What’s the difference between @Component, @Controller, @Repository & @Service annotations in Spring?

4. Spring Aspect Oriented Programming (AOP)

4.1 What is AOP?

4.2 Whats is Aspect?

4.3 What do you understand by Aspect Oriented Programming?

4.4

4.5 What is Aspect, Advice, Pointcut, JointPoint and Advice Arguments in AOP?

4.6

4.7 What is the difference between Spring AOP and AspectJ AOP?

4.8 What is Advice?

4.9 What is Weaving? What are the different points where weaving can be applied?

5. Spring Model View Controller (MVC)

5.1 What is Spring MVC framework?

5.2 What is a Controller in Spring MVC?

5.3 What’s the difference between @Component, @Controller, @Repository & @Service annotations in Spring?

5.4 What is DispatcherServlet and ContextLoaderListener?

5.5 What is ViewResolver in Spring?

5.6 What is a MultipartResolver and when its used?

5.7 How to handle exceptions in Spring MVC Framework?

5.8 How to create ApplicationContext in a Java Program?

5.9 Can we have multiple Spring configuration files?

5.10 What is ContextLoaderListener?

5.11 What are the minimum configurations needed to create Spring MVC application?

5.12 How would you relate Spring MVC Framework to MVC architecture?

5.13

5.14 How to achieve localization in Spring MVC applications?

5.15 What are some of the important Spring annotations that are frequently used?

5.16 Can we send an Custom Object as the response of Controller handler method?

5.17 How to upload file in Spring MVC Application?

5.18 How to validate form data in Spring Web MVC Framework?

5.19 What are Spring MVC Interceptor and how to use it?

5.20 What is a Spring Application Context? What are some example usages of one?

5.21 How do you load and inject properties into a Spring Bean?

5.22 What are the different ways to configure a class as Spring Bean?

6. Spring Data Access

6.1 How can JDBC be used more efficiently in the Spring framework?

6.2 How would you achieve Transaction Management in Spring?

6.3 How to use Tomcat JNDI DataSource in Spring Web Application?

6.4 What are the benefits of the Spring Framework’s transaction management