It's 2021, and you don't understand Spring. Why should Internet companies give you an offer!

Preface

The word Spring is certainly not unfamiliar to developers. Maybe you are using Spring every day and enjoying the services provided by the Spring ecosystem. Of course you use SpringIOC and SpringAOP to implement the functions your boss gives you. Well, it is used like this ( The class is declared as a Bean component, and then injected), it can complete the boss task, no problem. If you ask you what Spring is and what core functions does Spring have, you will think: This is too simple. Spring is the framework. The core functions of Spring are IOC and AOP, So Easy! But do you really know Spring?

 

Spring is an open source framework, originally created by Rod Johnson, to solve the complexity of enterprise-level application development. Many frameworks claim to simplify Java development in some aspects, but Spring's goal is to simplify Java development in all respects. This is also the fundamental mission of Spring to "simplify Java development".

The knowledge about Spring summarizes a mind map to share with everyone

 

Some netizens said: In 2020, if you don't understand spring, give up Java, right? The 119 hottest spring questions on the whole network, how many do you know? Let's take a look at the following questions!

 

 

Spring interview questions (1)

1. General issues

1.1. What are the main functions of different versions of Spring Framework?

1.2 What is Spring Framework?

1.3. List the advantages of Spring Framework.

1.4. What are the different functions of Spring Framework?

1.5. How many modules are there in Spring Framework and what are they?

1.6. What is a Spring configuration file?

1.7. What are the different components of a Spring application?

1.8. What are the ways to use Spring?

2. Dependency Injection (Ioc)

2.1. What is the Spring IOC container?

2.2. What is dependency injection?

2.3. How many ways can dependency injection be accomplished? ..

2.4. Distinguish between constructor injection and setter injection. .

2.5. How many kinds of IOC containers are there in spring?

2.6. Distinguish BeanFactory and ApplicationContext.

2.7. List some of the benefits of IoC.

2.8. Implementation mechanism of Spring IoC.

3、Beans

3.1. What is a spring bean?

3.2. What configuration methods does spring provide?

3.3. Does spring support centralized bean scope?

3.4. What is the life cycle of the spring bean container?

3.5. What is the internal bean of spring?

3.6 What is spring assembly

3.7. What are the methods of automatic assembly?

3.8. What are the limitations of automatic assembly?

4. Annotation

4.1, what is the annotation-based container configuration

4.2. How to start annotation assembly in spring?

4.3. What is the difference between @Component, @Controller, @Repository, and @Service?

4.4. What is the use of @Required annotation?

4.5. What is the use of @Autowired annotation?

4.6. What is the use of @Qualifier annotation?

4.7. What is the use of @RequestMapping annotation?

5. Data access

5.1 What is the use of spring DAO?

5.2. List the exceptions thrown by Spring DAO.

5.3. What classes exist in the spring JDBC API?

5.4. What are the ways to access Hibernate using Spring?

5.5. List the transaction management types supported by spring

5.6. Which ORM frameworks does spring support?

6、AOP

6.1. What is AOP?

6.2. What is Aspect?

6.3 What is the point of contact (JoinPoint)

6.4. What is Advice?

6.5. What types of notices (Advice) are there?

6.6. Point out the difference between concern and cross-cutting concern in spring aop.

6.7. What are the implementation methods of AOP?

6.8. What is the difference between Spring AOP and AspectJ AOP?

6.9. How to understand the proxy in Spring?

6.10. What is Weaving?

7、MVC

7.1. What is the use of Spring MVC framework?

7.2. Describe the workflow of DispatcherServlet

7.3, introduce WebApplicationContext.

 

 

Spring interview questions (2)

General question

1. What is spring?

2. What are the benefits of using Spring framework?

3. What modules does Spring consist of?

4. Core container (application context) module.

5. BeanFactory-BeanFactory implementation examples.

6、XMLBeanFactory

7. Explain the AOP module

8. Explain the JDBC abstraction and DAO module.

9. Explain the object/relational mapping integration module.

10. Explain the WEB module.

12. Spring configuration file

13. What is the Spring IOC container?

14. What are the advantages of IOC?

15. What is the usual implementation of ApplicationContext?

16. What is the difference between Bean Factory and Application Contexts?

17. What does a Spring application look like?

Dependency injection

18. What is dependency injection in Spring?

19. What are the different types of IOC (dependency injection) methods?

20. Which method of dependency injection do you recommend, constructor injection or Setter method injection?

Spring Beans

21. What are Spring beans?

22. What does a Spring Bean definition include?

23. How to provide configuration metadata to the Spring container?

24. How do you define the scope of a class?

25. Explain the scope of several beans supported by Spring.

26. Are singleton beans in the Spring framework thread-safe?

27. Explain the life cycle of beans in the Spring framework.

28. What are the important bean life cycle methods? Can you overload them?

29. What are Spring's internal beans?

30. How to inject a java collection in Spring?

31. What is bean assembly?

32. What is automatic assembly of beans?

33. Explain the different ways of automatic assembly.

34. What are the limitations of automatic assembly?

35. Can you inject a null and an empty string into Spring?

Spring annotation

36. What is Java-based Spring annotation configuration? Give some annotation examples

37. What is the annotation-based container configuration?

38. How to open annotation assembly?

39, @Required annotation

40, @Autowired annotation

41, @Qualifier annotation

Spring data access

42. How to use JDBC more effectively in the Spring framework?

43 、 JdbcTemplate

44. Spring's support for DAO

45. How to access Hibernate by using Spring?

46. ​​ORM supported by Spring

47. How to combine Spring and Hibernate through HibernateDaoSupport?

48. Types of transaction management supported by Spring

49. What are the advantages of Spring framework transaction management?

50. Which type of transaction management do you prefer?

Spring aspect-oriented programming (AOP)

51, explain AOP

52, Aspect

52. What is the difference between focus and crosscutting focus in Spring AOP?

54. Connection point

55. Notification

56, the cut point

57. What is introduction?

58. What is the target object?

59. What is an agency?

60. How many different types of automatic agents are there?

61. What is weaving. What are the differences in weaving applications?

62. Explain the realization of the aspect based on XML Schema.

63. Explain the implementation of annotation-based aspects

Spring 的 MVC

64. What is Spring's MVC framework?

65、DispatcherServlet

66、WebApplicationContext

67. What is the controller of the Spring MVC framework?

68, @Controller annotation

69, @RequestMapping annotation

The above questions are just a reference for you. The most important thing is to increase your knowledge reserves and be prepared.

Regarding the 119 hottest spring issues on the entire network, I have summarized more than 40 pages of pdf documents, and pay attention to the official account: Kylin change bugs.

Hope to help you review before the interview and find a good job, and also save everyone's time to search for information on the Internet to learn.

to sum up

According to the latest official Spring statement, Spring is the origin of modern Java.

It is undeniable that Spring is the absolute king no matter in the Java ecosystem or in the job market. The interview rate is high, and the scale of production is unparalleled. With the development of technology, Spring has evolved from the old IoC framework to the Cloud Native infrastructure, deriving a large number of Spring technology stacks, such as the well-known Spring Boot, Spring Cloud, and Spring Security. Therefore, the Spring ecosystem has become huge, such as Apache Dubbo's integration of Spring Framework, various middleware Spring Boot Starters, and various Spring Cloud implementation solutions.

At last

Welcome everyone to communicate, if you like the article, remember to follow me and give me a like, thank you for your support!

Guess you like

Origin blog.csdn.net/QLCZ0809/article/details/112280793