Interviewer: What should I say about your understanding of Spring MVC?

A fan who has been working for 7 years said that he was well prepared for Spring before the interview.

I also went through various interview questions, but during the interview, the interviewer asked: "Tell me about your understanding of Spring MVC."

This question was difficult for him to solve at once. It was the kind of thing where he suddenly didn’t know how to organize the language. In the end, he failed the interview because his answers were confusing.

OK, for this question, let’s take a look at the answers from ordinary people and experts.

Ordinary people:

Spring MVC is an MVC framework.

You can use Spring MVC to develop web applications

Expert:

Okay, I will answer this question from several aspects.

First of all, Spring MVC is a module in the Spring Framework ecosystem. It is a Web framework built on Servlet and designed using the MVC pattern.

The main purpose is to simplify the Web development method under the traditional Servlet+JSP model.

Secondly, the overall architecture design of Spring MVC has enhanced and expanded the MVC architecture pattern in Java Web, mainly in several aspects.

  1. The Controller controller in the traditional MVC framework is split into a front-end controller DispatcherServlet and a back-end controller Controller.
  2. Split the Model model into the business layer Service and the data access layer Repository.
  3. In the view layer, different views can be supported, such as Freemark, velocity, JSP, etc.

Therefore, Spring MVC is inherently designed for the MVC pattern, so it will be more convenient and flexible when developing MVC applications.

The specific workflow of Spring MVC is that the browser's request will first pass through the core controller DispatcherServlet in Spring MVC, which is responsible for distributing the request to the corresponding Controller.

After the business logic is processed in the Controller, it returns to ModeAndView.

Then DispatcherServlet looks for one or more ViewResolver view parsers, finds the view specified by ModeAndView, and displays the data to the client.

The above is my understanding of Spring MVC.

Summarize

I have trained more than 30,000 Java architects, and I found that their understanding of technology only stays at the usage level.

They didn't think deeply about the underlying design of these technical frameworks, which led them to work for 5 years.

When I want to change the architecture, I lack top-level design capabilities and abstract thinking.

The latest collection of Java interview questions in 2022, including Java collections, JVM, multi-threading, concurrent programming, design patterns, SpringBoot, SpringCloud, Java, MyBatis, ZooKeeper, Dubbo, Elasticsearch, Memcached, MongoDB, Redis, MySQL, RabbitMQ, Kafka, Linux, Netty, Tomcat, big data, Alibaba and other big factory interview questions and other technology stacks! Get all interview question resources at the end of the article

Java collection container

  1. what is a collection
  2. Collection features
  3. The difference between sets and arrays
  4. Benefits of using collection framework
  5. What are the commonly used collection classes?
  6. What is the difference between List, Set and Map?
  7. Collection framework underlying data structure
  8. Which collection classes are thread-safe?
  9. Java collection's fail-fast mechanism "fail-fast"?
  10. How to ensure that a collection cannot be modified?

Java multithreading

  1. What is the use of multithreading?
  2. What is the difference between thread and process?
  3. What are the ways to implement threads in Java?
  4. What is the difference between start() and run() methods to start a thread?
  5. How to terminate a thread? How to terminate thread gracefully?
  6. What are the states of a thread's life cycle? How do they flow between them?
  7. What is the difference between wait() and sleep() method in thread?
  8. What are the methods of multi-thread synchronization?
  9. What is a deadlock? How to avoid deadlock?
  10. How to communicate between multiple threads?

Concurrent programming in Java

  1. Why use concurrent programming
  2. Multi-threaded application scenarios
  3. What are the disadvantages of concurrent programming?
  4. What are the three necessary factors for concurrent programming?
  5. How to ensure the safety of multi-threaded operation in Java programs?
  6. What is the difference between parallelism and concurrency?
  7. What is multithreading
  8. Benefits of multithreading
  9. Disadvantages of multithreading
  10. The difference between threads and processes

JVM virtual machine

  1. How does the Java code written by our developers make the computer understand
  2. Why is Java a cross-platform language?
  3. The difference between Jdk, Jre and JVM
  4. Tell me what parts the JVM consists of, and what is the running process?
  5. Let’s talk about the JVM runtime data area
  6. Introduce the program counter in detail? (Key points to understand)
  7. Detailed introduction to the Java virtual machine stack (key understanding)
  8. Can you give me a detailed introduction to the Java heap (key understanding)
  9. Can you explain the native method stack?
  10. Can you explain the method area (key to understanding)

  1. What is the default port of Tomcat and how to modify it?
  2. What kinds of Connector operation modes (optimization) does Tomcat have?
  3. How many deployment methods are there for Tomcat?
  4. How does the Tomcat container create a servlet class instance? What principle is used?
  5. How to optimize Tomcat?
  6. Tomcat memory tuning
  7. Tomcat Garbage Collection Policy Tuning
  8. Tomcat shared session processing
  9. Tomcat adds JMS remote monitoring
  10. Professional analysis tools include

  1. What kinds of locks are there in MySQL?
  2. What are the different tables in MySQL?
  3. Briefly describe the difference between MyISAM and InnoDB in the MySQL database
  4. Four transaction isolation level names supported by InnoDB in MySQL
  5. What is the difference between CHAR and VARCHAR?
  6. What is the difference between primary key and candidate key?
  7. What is myisamchk used for?
  8. What happens if a table has a column defined as TIMESTAMP?
  9. How do you see all indexes defined for a table?
  10. What are column comparison operators?

Memcached

  1. What is Memcached and what does it do?
  2. How to implement Memcached service distributed cluster?
  3. What are the characteristics and working principle of Memcached service?
  4. Briefly describe the principle of Memcached memory management mechanism?
  5. How does Memcached work?
  6. What is the biggest advantage of Memcached?
  7. What are the advantages and disadvantages of Memcached and MySQL's querycache?
  8. Compared with the server's local cache (such as PHP's APC, mmap files, etc.), what are the advantages and disadvantages of memcached?
  9. What is the cache mechanism of memcached?
  10. How does memcached implement redundancy mechanism?

  1. What is Redis?
  2. What are the advantages and disadvantages of Redis?
  3. What are the benefits of using redis?
  4. Why use Redis / why use cache
  5. Why use Redis instead of map/guava for caching
  6. Why is Redis so fast?
  7. What data types does Redis have?
  8. Redis application scenarios
  9. Redis persistence
  10. What is the persistence mechanism of Redis? What are the advantages and disadvantages of each?

elasticsearch

  1. How much do you know about elasticsearch? Tell us about your company's ES cluster architecture, index data size, number of shards, and some tuning methods.
  2. What is the inverted index of elasticsearch?
  3. What to do if elasticsearch has too much index data, how to tune and deploy
  4. How elasticsearch implements master election
  5. Describe in detail the process of Elasticsearch indexing documents
  6. Describe the Elasticsearch search process in detail?
  7. What are the optimization methods for Linux settings when deploying Elasticsearch?
  8. What is the internal structure of ucence?
  9. How does Elasticsearch implement Master election?
  10. What should I do if 10 of the nodes in Elasticsearch (for example, 20 in total) choose one master and the other 10 choose another master?

ZooKeeper

  1. What is ZooKeeper?
  2. What does ZooKeeper offer?
  3. Zookeeper file system
  4. ZAB agreement?
  5. Four types of data nodes Znode
  6. Zookeeper Watcher mechanism – data change notification
  7. Client registration Watcher implementation
  8. Server-side processing Watcher implementation
  9. Client callback Watcher
  10. ACL permission control mechanism

  1. Why use Dubbo?
  2. What is Dubbo?
  3. What are the usage scenarios of Dubbo?
  4. What are the core functions of Dubbo?
  5. What are the core components of Dubbo?
  6. Dubbo server registration and discovery process?
  7. What are the layers of Dubbo's overall architecture design?
  8. Dubbo Monitor implementation principle?
  9. What other distributed frameworks are similar to Dubbo?
  10. What is the relationship between Dubbo and Spring Cloud?

RocketMq

  1. What is RocketMq
  2. What functions does RocketMq have?
  3. RoctetMq architecture
  4. RocketMq message model (technical term)
  5. key problem
  6. sequential message
  7. Message filtering
  8. Message deduplication
  9. Distributed transaction messages
  10. Message availability
  11. Flash disk implementation
  12. load balancing

  1. Kafka architecture
  2. Kafka basic concepts
  3. Kafka Rebalance
  4. Log index
  5. High performance, high throughput
  6. Reason for partitioning
  7. Write sequentially
  8. Batch sending
  9. data compression
  10. Page Cache & MMap
  11. Page Cache
  12. MMap (Memory Mapped Files, memory mapped files)

[Click here for free goods area]

RabbitMQ

  1. What is MQ
  2. Advantages of MQ
  3. What are decoupling, asynchronous and peak clipping?
  4. What are the disadvantages of message queues
  5. What messaging middleware does your company use in its production environment?
  6. What are the advantages and disadvantages of Kafka, ActiveMQ, RabbitMQ, and RocketMQ?
  7. What are the frequently asked questions about MQ? How to solve these problems?
  8. What is RabbitMQ?
  9. Rabbitmq usage scenarios
  10. RabbitMQ basic concepts

  1. Netty
  2. I/O mode
  3. I/O multiplexing
  4. select
  5. poll
  6. epoll
  7. Java's I/o
  8. Netty thread model and Reactor mode
  9. Echo service
  10. Source code analysis

Scan the QR code at the end of the article to get the information for free!

Guess you like

Origin blog.csdn.net/Trouvailless/article/details/132229101