Interview Questions and Answers for 'Spring' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Spring' - 81 question(s) found - Order By Rating

next 30
 Q1. What is the purpose of Spring inheritance ?Spring
 This question was recently asked at 'IBM India'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q2. Can you explain integration between Spring and Hibernate ?Hibernate
 This question was recently asked at 'HCL Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Spring framework  Hibernate Orm     Asked in 1 Companies


 Q3. How to deploy spring boot application without restart in prod envSpring Boot
 This question was recently asked at 'HCL Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q4. Rest API crud operation using spring bootSpring Boot
 This question was recently asked at 'HCL Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q5. Explain life cycle of Spring Application ?Spring
Ans. Instantiation by using:
InitializingBean callback interface.
Custom init() method from the bean configuration file.
Aware interfaces for distinct actions.
PostConstruct and PreDestroy annotations.
Destruction.
DisposableBean callback interface

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q6. Explain Spring mvc.Spring
 This question was recently asked at 'Esoft Services'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q7. How many objects are created when we define a bean with two different name in spring?Spring
Ans. we wont create the objects because of each and every bean will be an object

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q8. Difference between spring and spring bootSpring Framework
Ans. Spring is a Framework where we have to Build the Configurations Manually but Springboot have default configurations that allow faster bootstrapping. Spring Framework requires a number of dependencies to create a web app. Spring Boot, on the other hand, can get an application working with just one dependency.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     spring boot     Asked in 1 Companies


 Q9. Difference between injection and auto wiring.Spring
 This question was recently asked at 'Yudiz Solutions'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q10. Difference between Spring and Spring MVC ?Spring
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q11. Give specific situation about when to go for constructor based injection and setter based injection in spring.Spring
 This question was recently asked at 'Tata Consultancy (TCS)'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q12. what is dispatcher servlet@componentScan use ?Spring Framework
Ans. @ComponentScan in a Spring Application.

With Spring, we use the @ComponentScan annotation along with the @Configuration annotation to specify the packages that we want to be scanned. @ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ComponentScan  dispatcher  @ComponentScan annotation  @Configuration annotation     Asked in 1 Companies


 Q13. What is stereotype annotation ?Spring
Ans. These annotations are used to create Spring beans automatically in the application context. The main stereotype annotation is @Component . @Controller: Which is used to create Spring beans at the controller layer. The stereotype annotations in spring are @Component, @Service, @Repository and @Controller

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     stereotype annotation   stereotype annotation spring     Asked in 1 Companies


 Q14. How did you use Spring in your project ? Which Spring annotations have you used in your project ?Spring
Ans. @RequestMappping

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     spring  spring annotations     Asked in 1 Companies


 Q15. What is @EnableSptringMVC ?Spring
 This question was recently asked at 'Tata Consultancy (TCS)'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q16. What is the difference between try-catch and @ExceptionHandler in Java/Spring Boot?Spring Boot
Ans. ExceptionHandler is Used to handle at Method level

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     @ExceptionHandler


 Q17. Without configure ContextLoaderListenerAnd DispatcherServlet how to run spring MVCApplication?Spring
 This question was recently asked at 'Naresh i Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q18. Can you explain spring boot project Architecture?Spring Boot
Ans. The architecture of a Spring Boot project can be divided into three layers:

Presentation Layer:
This layer is responsible for handling user requests and generating responses. It includes the user interface, which can be a web UI or a RESTful API. Spring Boot provides various options to develop web applications, such as Spring MVC, Thymeleaf, and others.

Service Layer:
This layer contains the business logic of the application. It is responsible for processing the user requests and generating responses. The Service Layer interacts with the Data Access Layer to fetch and store data.

Data Access Layer:
This layer is responsible for interacting with the database or any other external data source. It includes the database model, repositories, and data access objects. Spring Boot provides support for various data access technologies, such as JPA, JDBC, and Spring Data JPA.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q19. What are the features of Spring Framework ?Spring
Ans. Core technologies: dependency injection, events, resources, i18n, validation, data binding, type conversion, SpEL, AOP.

Testing: mock objects, TestContext framework, Spring MVC Test, WebTestClient.

Data Access: transactions, DAO support, JDBC, ORM, Marshalling XML.

Spring MVC and Spring WebFlux web frameworks.

Integration: remoting, JMS, JCA, JMX, email, tasks, scheduling, cache.

Languages: Kotlin, Groovy, dynamic languages.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q20. Difference between Component-Scan and @Component annotation ? Spring
Ans. @component mark a java class as a bean so that component scan mechanism of spring pick it up and register in IOC container.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q21. Can we use Prototype Bean scope with Autowiring ?Spring
Ans. Default Bean scope in auto wiring is Singleton but Yes, that can be changed by specifying the Bean scope explicitly.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     spring boot   spring mvc  autowiring  bean scope   prototype bean scope      intermediate


 Q22. In which way are you using dependency injection in Spring ? Annotation , Config or Class ?Spring
Ans. Possible Answer - We are using config file.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Dependency injection     Asked in 1 Companies


 Q23. What is setter injection ?Spring
Ans. Setter Injection in Spring is a type of dependency injection in which the framework injects the dependent objects into the client using a setter method.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     setter injection   dependency injection     Asked in 2 Companies


 Q24. Which spring boot version are you working with ?Spring Boot
 This question was recently asked at 'Western Governors University (WGU)'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q25. Why do we need to initialize Spring context ?Spring
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q26. What is ViewResolver in Spring MVC ?Spring
Ans. View resolver is used to get view name from Controller and resolve the next view page

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q27. Which spring boot version are you working with ?

Spring Boot
 This question was recently asked at 'Western Governors University (WGU) '.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies      basic        frequent


 Q28. Can we capture the Request body within the interceptor or Filter and perform operations on it ?Spring
Ans. Yes, But with interceptor it will remove the body from the request and then we will have to explicitly add the attributes to the session to forward it to the handler.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     interceptor  filter


 Q29. Should we have instance variables in the Spring Bean which has been scoped as Singleton ?Spring
Ans. No, if required we should only have final variables. Bean scoped singleton means that only one instance of the bean will be created and will be shared among different requests and hence instance variables will get shared too.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     singleton     Asked in 1 Companies


 Q30. What is the difference between WebApplicationContext, ApplicationContext, DispatcherServlet, and rootContext in Spring framework?Spring
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: