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 - Order By Rating

   next 30
 Q31. What is difference between Spring jdbc template and Hibernate ?Hibernate
 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 JDBC vs Hibernate  Spring JDBC   Hibernate


 Q32. How does the @ComponentScan annotation work ?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     


 Q33. Which spring boot version are you working with ? Spring Boot
Ans. 2.5v

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q34. how do you share data between JSP and spring controller using Angular JS ?AngularJS
Ans. For JPS we can use modelAttribute and ModelAndView object to share data between JPS and Controller. In case of Angular JS, the angular js always get data in form of JSON and it can be accessed by REST WS. So the angular js share data with controller in the form of JSON.

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

   Like         Discuss         Correct / Improve     angularjs  jsp  spring controller     Asked in 1 Companies


 Q35. What is the difference between Singleton and Prototype Bean scope in Spring ?Spring
Ans. Prototype scope - A new object is created each time it is injected/looked up. It will use new SomeClass() each time.

Singleton scope - It is the default scope. The same object is returned each time it is injected/looked up. Here it will instantiate one instance of SomeClass and then return it each time.

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

   Like         Discuss         Correct / Improve     Spring beans  singleton bean scope  prototype bean scope     Asked in 1 Companies


 Q36. What are the disadvantages of Bean Auto Wiring in Spring ?Spring
Ans. It can always be overridden with explicit wiring. Moreover it's confusing if we use both explicit as well as explicit wiring in the project.

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

   Like         Discuss         Correct / Improve     Spring beans  auto wiring  autowiring


 Q37. How to use spring boot to configure different datasources ?Spring Boot
Ans. https://github.com/jahe/spring-boot-multiple-datasources

 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


 Q38. What is weaving in Spring ?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     Spring


 Q39. What are the different types of advices in AOP ?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     spring app  spring  aspect oriented programming


 Q40. What are the different ORMs supported by Spring ?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     spring orm


 Q41. What are the types of transaction management supported by Spring ?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     spring  spring transaction management


 Q42. What are some limitations or dis advantages of Auto Wiring ?Spring
Ans. Autowiring a class of the same type throws an exception.
We can user @Qualifier to overcome this.
Autowiring cannot be used for primitives.

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

   Like         Discuss         Correct / Improve     spring  autowiring  spring auto wiring


 Q43. Explain inner beans in Spring.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     spring  spring beans   spring inner beans


 Q44. Difference between ApplicationContext and BeanFactory ?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     ApplicationContext  BeanFactory   ApplicationContext vs BeanFactory        frequent


 Q45. Difference between constructor and setter injection ?Spring
Ans. 1. In Setter Injection, partial injection of dependencies can possible, means if we have 3 dependencies like int, string, long, then its not necessary to inject all values if we use setter injection. If you are not inject it will takes default values for those primitives1. In constructor injection, partial injection of dependencies cannot possible, because for calling constructor we must pass all the arguments right, if not so we may get error

2. Setter Injection will overrides the constructor injection value, provided if we write setter and constructor injection for the same property [i already told regarding this, hope you remember ] But, constructor injection cannot overrides the setter injected values

3. If we have more dependencies for example 15 to 20 are there in our bean class then, in this case setter injection is not recommended as we need to write almost 20 setters right, bean length will increase. In this case, Constructor injection is highly recommended, as we can inject all the dependencies with in 3 to 4 lines [i mean, by calling one constructor]

4. Setter injection makes bean class object as mutable [We can change ] .Constructor injection makes bean class object as immutable [We cannot change ]

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

   Like         Discuss         Correct / Improve     spring  dependency injection   inversion of control     Asked in 3 Companies


 Q46. What are the different ways in which dependency injection can be done using Spring Framework ?Spring
Ans. Using Constructor and Setters.

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

   Like         Discuss         Correct / Improve     spring  dependency injection   inversion of control


 Q47. What is the use of @Bean annotation in Spring ?Spring
Ans. There are 2 ways to specify dependencies in Spring, one by the way of specifying beans in config files and other is by specifying annotations like @Bean, @Component , @Service etc to let spring know of the dependencies.

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

   Like         Discuss         Correct / Improve     spring bean annotation  spring annotations


 Q48. Whats is the difference between Spring MVC and Spring Restful webservice ?Spring
 This question was recently asked at 'CapTech'.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


 Q49. Explain Spring invoke and wait.Spring
 This question was recently asked at 'TD Ameritrade'.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


 Q50. How to set maximum file upload size in Spring MVC ? Spring
Ans. We can use class MultipartResolver method setMaxUploadSize.

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

   Like         Discuss         Correct / Improve     


 Q51. Difference between MultipartResolver setMaxUploadSize and setMaxUploadSizePerFile ?Spring
Ans. setMaxUploadSize is used to set the maximum size of uploads that can be made in a request whereas setMaxUploadSizePerFile sets the maximum size per uploaded file.


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

   Like         Discuss         Correct / Improve     MultipartResolver


 Q52. What are the core interfaces of 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     core interfaces of Spring mvc


Frequently asked Spring interview question.
 Q53. What are the components of Spring framework ?Spring
Ans. Core: [Core, Bean, Context, Expression Language]

Web: [Web, Portlet, Servlet, etc]

Data Access [JMS, JDBC, etc]

AOP, Aspect

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

   Like         Discuss         Correct / Improve     spring  spring framework components     Asked in 12 Companies


 Q54. Tell us something about Spring framework ?Spring
Ans. Spring is a lightweight framework which gives in-build DI(Dependency injection) and IOC(Inversion of control) features. Where DI is used for injecting one bean into the another bean like Inheritance in Java and IOC is a controller which will control the flow of the bean like bean creation and so on. We will use Bean Factory and Application Context for configuring.

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q55. What are the advantages of Spring interceptor over Servlet Filters ?Spring
Ans. Spring Interceptor are Spring beans and hence they can inject other beans and can be used with other Spring frameworks concepts like AOP.

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

   Like         Discuss         Correct / Improve     interceptors  servlet filters  spring interceptors vs servlet filters


 Q56. Is there any relationship between Web.xml and Spring.xml ?Spring
Ans. No, there is no relationship between web.xml and spring.xml but you have to configure spring.xml in web.xml in order initialize beans when application starts up

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

   Like         Discuss         Correct / Improve     spring  web.xml  spring.xml  deployment descriptor     Asked in 1 Companies


 Q57. Explain your experience with Java, spring and web services?General
Ans. Have worked on Java 7 and Java 8, In Java 8 , Worked with streams , lambda expression and default methods.

Have worked on both Spring Mvc and Spring Boot, using Spring dependency injection, Rest services , AOP , JDBC and Hibernate integration.

Have worked on Rest services using Spring and Spring Boot. Have worked on SOAP web services too.

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

   Like         Discuss         Correct / Improve     spring  web services     Asked in 1 Companies


 Q58. What is Spring Security ?Spring
Ans. Spring Security is a powerful and highly customizable authentication and access control framework. It is the de facto standard for securing Spring-based applications.

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

   Like         Discuss         Correct / Improve          Asked in 3 Companies


 Q59. What is Spring Boot ?Spring Boot
Ans. Spring Boot is Springs convention-over-configuration solution for creating stand-alone, production-grade Spring-based Applications.

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

   Like         Discuss         Correct / Improve     Spring Boot     Asked in 7 Companies


 Q60. Can we have two beans with same class with different bean id in spring ?Spring
Ans. Yes

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

   Like         Discuss         Correct / Improve     spring beans     Asked in 1 Companies


previous 30   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: