The mentality collapsed! A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

Foreword: Today, Spring has a high rate of interview appearances in the Java ecosystem and job market, and the scale of production is unparalleled. With the development of technology, Spring has developed from the old IoC framework to the Cloud Native infrastructure, and has derived a large number of Spring technology stacks, such as SpringBoot, Spring Cloud and Spring Security, which are well known to all.

The success of Spring has also brought considerable challenges to developers, both in architecture selection and in daily development. Only by systematically mastering the idea, design, and implementation of Spring Framework, can you do well, so as to avoid losing ground. The huge ecology needs more efficient methods to clarify ideas, rich experience to guide the confusion, and sufficient practice to consolidate the effect. Let’s take a look at what the interviewer said.

Interviewer: It ’s written on your resume that you have read the Spring source code, right?

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Me:  yes

Interviewer: Which parts have you read?

Me: I have read the source code of Spring's startup process, such as scanning package, executing Bean factory post processor, Bean generation process, etc. (full of confidence)

Interviewer: I read a lot, so can you talk about how a bean is generated?

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Me: The generation process of Bean is the life cycle of Bean, including instantiation of Bean, attribute injection, initialization, etc. (dangerous...)

Interviewer: Well, can you talk about instantiation in more detail? For example, if a class has multiple constructors, which constructor should Spring choose to instantiate?
Me:  This..., I won't

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Interviewer:  Okay, how much do you know about attribute injection, such as the working principle of the @Autowire annotation. What is the difference in the underlying principle between adding this annotation to the attribute and adding it to the method?

Me:  I don’t know, only byname and bytype

Interviewer:  Okay, then we will come to Spring first. Let me ask you Mysql. What storage engines are there in Mysql?
Me:  I know Innodb and MyISAM, there are others, but I can’t remember

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Interviewer:  What is the difference between Innodb and MyISAM?

Me: Innodb supports transactions

Interviewer: Anything else?

Me:  I only know this, the others...don’t know

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Interviewer: Do  they differ in the underlying implementation of the index?
Me:  Oh...it seems to be there, but I don’t remember

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Interviewer:  How is the underlying index in Innodb implemented?
Me: B+ tree
Interviewer:  Then why is B+ tree suitable as an index?
Me:  ...don't know

Interviewer:  Okay, I don't usually use Mysql much?
Me:  Yes Yes Yes (Skip this topic quickly)

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Interviewer:  Then I would like to ask JVM-related, what is the difference between various garbage collectors in JVM? How to tune JVM? What is the idea of ​​tuning?
Me: ...

Interviewer:  What about Redis? What do you use Redis for in your daily work?
Me:  Mainly used to cache some frequently used data, such as some information about products

 

Interviewer:  Did you know the solution for hot data?
Me:  We just put some commonly used product information in Redis.
Interviewer:  Well, how do you update the product information cached in Redis and what is the elimination mechanism?
Me:  This area... I don’t have much contact with it, and I haven’t studied it much

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Interviewer:  Oh, that's okay, let's get here first

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

Maybe this is just an ordinary interview experience, but there are many problems revealed. At work, the product keeps writing about business requirements. They may only need to work one day overtime, and the development will have to work for a week to complete.
When the business field reaches a certain level, it is difficult to write business code daily to bring breakthrough progress. At this time, you must be wary of whether you have become a business code production machine , and whether you can calmly respond to new technologies and adapt to changes in the big environment.
On the other hand, "programming language is the way the programmer expresses, and the architecture is the programmer's perception of the world" . After experiencing the tempering of thousands of lines of code, through architecture to appreciate the beauty of programming languages ​​from different perspectives.

In order to give you a deeper understanding of the Spring source code and the technical points of MYSQL, REDIS, and JVM, and get rid of the interviewers' chase, the following summarizes some of the spring high-frequency problems that have appeared in my interview during this period of time. The answers to all questions have been sorted into PDF, including the welfare information at the end of the article, which are free to obtain and receive. After three consecutive private messages [ welfare ] or view the following to receive.

  • What are the benefits of using the Spring framework?
  • What is Inversion of Control (IOC)? What is dependency injection?
  • Please explain the IoC in the Spring framework?
  • What is the difference between BeanFactory and ApplicationContext?
  • How many ways to configure Spring?
  • How to configure Spring based on XML configuration?
  • How to configure Spring based on Java configuration?
  • How to configure Spring with annotations?
  • Please explain the life cycle of Spring Bean?
  • What is the difference between the scope of Spring Bean?
  • What are Spring inner beans?
  • Are singleton beans in the Spring framework thread-safe?
  • Please give an example of how to inject a Java Collection in Spring?
  • How to inject a Java.util.Properties into Spring Bean?
  • Please explain the autowiring of Spring Bean?
  • Please explain the difference in auto-assembly mode?
  • How to enable annotation-based automatic assembly?
  • Please give an example to explain the @Required annotation?
  • Please give an example to explain the @Autowired annotation?
  • What is the difference between constructor injection and setting injection?
  • What are the different types of events in the Spring framework?
  • What is the difference between FileSystemResource and ClassPathResource?
  • What design patterns are used in the Spring framework? ] To receive.
  • What is the Spring framework? What are the main modules of the Spring framework?
  • What are the benefits of using the Spring framework?
  • What is Inversion of Control (IOC)? What is dependency injection?
  • Please explain the IoC in the Spring framework?
  • What is the difference between BeanFactory and ApplicationContext?
  • How many ways to configure Spring?
  • How to configure Spring based on XML configuration?
  • How to configure Spring based on Java configuration?
  • How to configure Spring with annotations?
  • Please explain the life cycle of Spring Bean?
  • What is the difference between the scope of Spring Bean?
  • What are Spring inner beans?
  • Are singleton beans in the Spring framework thread-safe?
  • Please give an example of how to inject a Java Collection in Spring?
  • How to inject a Java.util.Properties into Spring Bean?
  • Please explain the autowiring of Spring Bean?
  • Please explain the difference in auto-assembly mode?
  • How to enable annotation-based automatic assembly?
  • Please give an example to explain the @Required annotation?
  • Please give an example to explain the @Autowired annotation?
  • What is the difference between constructor injection and setting injection?
  • What are the different types of events in the Spring framework?
  • What is the difference between FileSystemResource and ClassPathResource?
  • What design patterns are used in the Spring framework?

Because of limited space, the following are more screenshots of knowledge points displayed in the form of a catalog

1. 55 Spring high-frequency questions (seven modules)

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Two, Spring Data combat

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Three, Spring Boot interview topics and analysis

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Four, SpringCloud Reference Guide

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Six deep analysis of Spring source code

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

All documentation is freely available. How to get: Scan and send after three consecutive  runs

Data compilation PDF display

Benefit one: spring family bucket

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

Spring Family Bucket

Benefit 2: Technical information + detailed interview video + Dachang interview question bank

A Spring interview question took half an hour with the interviewer. Anyway, I was scared!

 

Guess you like

Origin blog.csdn.net/m0_46757769/article/details/109489166