In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the interview questions of JavaEE framework". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the interview questions of the JavaEE framework?"
First, briefly talk about the workflow of SpringMVC?
1. The user sends a request to the front-end controller DispatcherServlet
2. DispatcherServlet receives a request to call the HandlerMapping processor mapper.
3. The processor mapper finds the specific processor, generates the processor object and the processor interceptor (if any) and returns it to DispatcherServlet.
4. DispatcherServlet calls HandlerAdapter processor adapter
5. HandlerAdapter calls the specific processor (Controller, also known as the back-end controller) after adaptation.
6. Return ModelAndView after Controller execution is completed
7. HandlerAdapter returns the controller execution result ModelAndView to DispatcherServlet
8. DispatcherServlet passes ModelAndView to ViewReslover view parser
9. Return specific View after ViewReslover parsing
10. DispatcherServlet renders the view according to the View (populating the model data into the view).
11. DispatcherServlet responds to users
What are the main differences between SpringMVC and Struts2?
1. The entrance to springmvc is a servlet or front-end controller, while the entrance to struts2 is a filter filter.
2. Springmvc is developed based on method, and parameters are transferred through method parameters, which can be designed as single or multiple cases (recommended singleton). Struts2 is based on class development, and parameters are transferred through class properties, which can only be designed for multiple cases.
3. Struts uses the value stack to store the request and response data, and accesses the data through OGNL. Springmvc parses the request object content into method parameters through the parameter parser, encapsulates the response data and the page into ModelAndView objects, and finally transmits the model data to the page through the request object. The Jsp view parser uses jstl by default.
What are the benefits of mybatis interface binding?
Interface mapping is to define an interface arbitrarily in IBatis, then bind the methods in the interface to SQL statements, and call the interface methods directly, so that you can have more flexible choices and settings than the original methods provided by SqlSession.
4. How to implement mybatis dynamic sql?
MyBatis in the dynamic Sql is generally achieved through the if node, through the OGNL syntax to achieve, but if you want to write a complete, you must cooperate with the where,trim node, where node is to determine that the containing node contains content to insert where, otherwise do not insert, trim node is used to determine if the dynamic statement is started with and or or, then the and or or will be automatically removed.
5. The difference between mybatis and Hibernate?
Both of them are orm mapping framework, mybatis mapping is reflected in sql, Hibernate is reflected in entity class design.
Mybatis is not difficult to learn and Hibernate is difficult, but once you master Hibernate development cycle is short, basically do not need to write sql.
Suitable for scenarios: Hibernate is suitable for projects with a small amount of data. For million-level tables, Hibernate queries are cached in session, which takes up a large amount of memory, which may lead to server memory overflow. Mybatis is suitable for projects with large amount of data. The general query efficiency of Hibernate is also lower than that of mybatis, which involves entity classes and the conversion from hql to sql. If the project functions are commonly used modes of adding, deleting, changing and querying, it is suitable for Hibernate and easy to develop, but if the table relationship is complex and often associated with queries, it is suitable for mybatis.
At this point, I believe you have a deeper understanding of "what are the interview questions for the JavaEE framework?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.