Spring Interview Questions and Answers

    0 Votes

27. What is Expression Language module?

The expression language module of Spring is a language which is used to query or modify objects at runtime. It is similar to the expression language specified in the JSP specification.
28. What does Data Access/Integration module in Spring consists of?
The Data Access/Integration layer consists of following modules.
  • JDBC
  • ORM
  • OXM
  • JMS
  • Transaction

 

29. How will you fetch records by spring JdbcTemplate?
You can fetch records from database by using query() method of JdbcTemplate. There are two interfaces to do this. They are
  • ResultSetExtractor
  • RowMapper
30. What does Spring JDBC module provides to Spring Framework?

The Spring JDBC module provides a JDBC abstraction layer which eliminates tedious & monotonous JDBC coding and database vendor specific error code parsing, thus making it simpler and easier to use.

31. What does ORM module provides to Spring?

The Object Relational Mapping (ORM) module of Spring provides integration layers for popular ORM APIs(JPA, Hibernate, JDO and iBatis) for fast and easy integration. The spring-orm module makes sure that we use all the features of these OR-mapping frameworks in combination with all of the other features Spring offers.

32. What is Spring OXM module?

The OXM module provides Object/XML mapping implementations for JAXB, Castor, XMLBeans, Xstream etc.

33. What does JMS module provides to Spring?

The Java Messaging Service (JMS) module of Spring has features for producing and consuming messages.

34. What are the transaction management supports provided by spring?

The Transaction module provides declarative transaction management (Here, transactions are managed using annotations or XML based configuration) using Spring AOP and API for programmatic transaction management (Here, transactions are managed programmatically) for all classes.

35. What does web module in Spring consists of?

The web module consists of the

  • Web
  • Web-Servlet
  • Web-Struts
  • Web-Portlet modules

36. What is Spring's web module?

Spring's web module supports basic web functionalities such as

  • Multipart file upload
  • IOC container initialization using Servlet listeners & Web application context

37) How does request flow happens in Spring MVC?

Action taken by DispatcherServlet, which acts as the front controller is listed below.

Spring MVC Request Flow

  • Step 1 - Request arrive at the Front Controller, i.e DispatcherServlet. Based on the configuration, DispatcherServlet resolves the theme and locale.
  • Step 2 - DispatcherServlet looks for the appropriate Controller(Handler) to handle the request. It also looks for the configured pre-processors and post-processors.
  • Step 3 - It will then redirect to the appropriate Controller. On receiving the request, the controller executes the request and returns a view name and a model object to the DispatcherServlet. Have a look at the Steps 4,5,6 in the above image.
  • Step 7 - DispatcherServlet resolves the view name send by the Controller and redirect it to the view template. The view template will send back the response html to the DispatcherServlet.
  • Step 8 - On receiving the response HTML, DispatcherServlet then sends back the response to the browser.
Page 3 of 5

Popular Videos

communication

How to improve your Interview, Salary Negotiation, Communication & Presentation Skills.

Got a tip or Question?
Let us know

Related Articles

JSP Interview Questions and Answers
Servlet Interview Questions and Answers
Advanced Servlet Interview Questions and Answers
EJB Interview Questions and Answers