Gold three silver four, thanks to this Java experience, successfully won offers from many major manufacturers

Foreword:

It is gold three silver four, today I will share with you a few high-frequency interview questions, as well as a detailed Java core interview document. I hope that friends who need to interview and change jobs can shine and rise up.

1. High-frequency interview questions

1. What is the execution process of SpringMVC?

The user sends a request to the server, and the request is captured by the Spring front-end control Servelt DispatcherServlet;

DispatcherServlet parses the request URL to obtain the requested resource identifier (URI). Then, according to the URI, call HandlerMapping to obtain all related objects (including the Handler object and the interceptor corresponding to the Handler object) of the Handler configuration, and finally return it in the form of a HandlerExecutionChain object;

DispatcherServlet selects an appropriate HandlerAdapter based on the Handler obtained. (Note: If the HandlerAdapter is successfully obtained, the preHandler(...) method of the interceptor will be executed at this time)

Extract the model data in the Request, fill the Handler input parameters, and start executing the Handler (Controller). In the process of filling the Handler input parameters, according to your configuration, Spring will help you do some extra work:

(1) HttpMessageConveter: Convert the request message (such as Json, xml, etc.) into an object, and convert the object into the specified response message

(2) Data conversion: Data conversion is performed on the request message. Such as String converted to Integer, Double, etc.

(3) Data root formatting: data formatting of the request message. Such as converting a string into a formatted number or formatted date, etc.

(4) Data verification: verify the validity of the data (length, format, etc.), and store the verification result in BindingResult or Error

After the Handler is executed, it returns a ModelAndView object to DispatcherServlet;

According to the returned ModelAndView, select a suitable ViewResolver (must be a ViewResolver registered in the Spring container) and return it to DispatcherServlet;

ViewResolver combines Model and View to render the view

Return the rendering result to the client.

Quick memory skills:

The core controller captures the request, finds the Handler, executes the Handler, selects the ViewResolver, renders the view through the ViewResolver and returns

2. What is AOP? What do you do with it?

1. AOP: aspect-oriented programming

2. Core principle: Use the dynamic agent design pattern to add relevant logic before and after the execution of the method or when an exception occurs.

We mainly use AOP to do:

1. Before the transaction processing execution method, open the transaction, close the transaction after the execution is completed, and roll back the transaction after an exception occurs

2. Judgment of authority Before executing the method, judge whether it has authority

3. Log processing before execution

3. How many Bean injection methods in Spring?

  1. Constructor injection
    Constructor injection, as the name implies, is to implement a constructor in a program component. The constructor can be one or multiple

  2. Setting value injection (setter injection) Setting value injection is to inject the bean into the component through the setXxxx method
  3. Feild injection (annotation injection).

4. Advantages of the SSM framework

Advantages of Spring: Through Spring's IOC feature, the dependencies between objects are handed over to Spring to control, which facilitates decoupling and simplifies development. Through Spring's AOP feature, the repeated modules are centralized, transactions, logs, and permissions are controlled, and integrated support for other excellent open source frameworks

Advantages of Spring MVC: Spring MVC is a lightweight web framework that uses MVC design ideas. It decouples the web layer to make our development more concise; seamlessly connects with Spring; flexible data verification, formatting, and data binding mechanisms

Advantages of Mybatis: The operation of the database (sql) adopts xml file configuration, which relieves the coupling between SQL and code; provides mapping tags, supports mapping between objects and database orm fields, supports object relationship mapping tags, and supports the provision of object relationship formation Added xml tag, supports dynamic sql

Two, Java core interview documents

The knowledge points of this PDF manual include five major parts:

  • Java part: Java basics, collections, concurrency, multithreading, JVM, design patterns
  • Data structure algorithm: Java algorithm, data structure
  • Open source framework part: Spring, MyBatis, MVC, netty, tomcat
  • Distributed part: architecture design, Redis cache, Zookeeper, kafka, RabbitMQ, load balancing, etc.
  • Microservice part: SpringBoot, SpringCloud, Dubbo, Docker

Due to space limitations and too much content, the documents are organized into pdf files. Friends who need this document: after one-click three-connection

 One, java knowledge part

Now interviews pay special attention to many principles and foundations, but many people do not have a thorough understanding of some core principles, especially some core basic knowledge points of Java, such as JVM, commonly used algorithms and data structures. As the so-called high-rise buildings rise from the ground, only by mastering the foundation firmly can we go further. In the face of constantly updated technology, we can quickly master it, and at the same time, we can stand out in interviews and work! The following shows the parts of Java knowledge that must be mastered. There are many contents, which are some key knowledge! ! !

1. Java basics:

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

2. Java collection:

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

3. Concurrency knowledge

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

5.java virtual machine (JVM)

JVM is a necessary path for the growth of junior Java programmers. Before learning JVM, you only need to know that the code is compiled into Class, and the virtual machine loads the Class to run. After learning JVM, you can deeply understand the process of code compilation to loading. , The creation and garbage collection of objects in memory, and the rapid positioning of performance problems in daily development are of course also indispensable bonus items for interviews.

6. Design patterns

I heard a sentence before, "Many programmers don’t know how to organize code, how to improve efficiency, how to improve code maintainability, reusability, scalability, and flexibility. The code written is a mess, but it can run normally. ". For such a statement, looking at the code left behind when entering the industry, I smiled with shame, perhaps for most people will feel the same.

From JDK source code to mainstream open source frameworks, the application of design patterns is everywhere. "Design patterns for my use" has more or less become the instinct of programmers' coding thinking.

Knowledge points:

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

7. Data structure and algorithm

Knowledge points to be mastered:

Which data structures (line, chain, heap, stack, queue) and where they are useful in Java. 8 major algorithms (time complexity, space complexity, memory, CPU impact) and their applications. KMP search algorithm, binary search, recursive algorithm (writing, memory influence). Numbers, graphs and their applications. Hash table, and where to use it in actual work

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

 

2. Database part

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

 

Third, the open source framework part

As a lightweight Java development framework, Spring integrates interface-oriented programming ideas throughout the entire Java system application, so it is often mentioned in Java interviews.

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

 

Fourth, the distributed high-concurrency architecture part

This part is about the knowledge of distributed architecture, including Redis, Zookeeper, database performance optimization, load balancing, etc.!

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

 

Five, microservice knowledge

Prepare for the gold three silver four, keep this Java experience in mind, big manufacturers are beckoning to you "with PDF documents"

 

 

Guess you like

Origin blog.csdn.net/bjmsb/article/details/114883900