Interview Questions and Answers - Order By Newest Q41. 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 Q42. 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 Q43. 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 Q44. 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 Q45. 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 Q46. 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 Q47. 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 Q48. 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 Q49. 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 Q50. 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   Q51. 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 Q52. 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   Q53. 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 Q54. 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 Q55. 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 Q56. 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 Q57. 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   Q58. 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 Q59. 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 Q60. 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 Q61. 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 Q62. 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 Q63. 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 Q64. 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 Q65. 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 Q66. 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 Q67. 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 Q68. 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 Q69. 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 Q70. 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