Still typing code mechanically? Many of us developers, when developing Spring applications, have, in many cases, passively accepted the examples of Spring features that our predecessors had made for us. This did reduce our development costs to a large extent, but it also lost a great learning opportunity and limited our developers’ ability to scale horizontally. If you only know how to use it without knowing what to do, then you are destined to be a coder. The Spring framework integrates almost half of Javaweb development, but you only know how to write it, not why, or how to optimize it.

As a lightweight Java development framework, Spring will interface oriented programming ideas throughout the entire Java system application, so it is often mentioned in the Java interview. In this article, we will talk about some important knowledge points in the Spring framework through some questions and questions in Spring. The following Xmind knowledge notes file can be collected for free at the end of the article!

Spring interview questions

  • What’s the difference between BeanFactory and ApplicationContext
  • Explain the life cycle of Spring beans
  • Scope of the Spring Bean
  • Are singleton Beans in the Spring framework thread-safe
  • What is the difference between constructor injection and set injection
  • What are the different types of events in the Spring framework
  • FileSystemResource and ClassPathResource
  • What design patterns are used in the Spring framework
  • The advantages of the Spring

Spring AOP questions

  • What is AOP?
  • What is point cut, advice, Join point?
  • What is the difference between Join Point and Point cut?
  • How do I understand aspects of aspect oriented programming?
  • What do you understand about SpringAOP Weaving?
  • What is the Introduction of SpringAOP?
  • A simple comparison between OOP and AOP?
  • JDK dynamic proxy and CGLIB proxy.
  • Explain the implementation principle of AOP based on Schema in Spring framework.
  • How to implement AOP based transaction management in the Spring framework?

Transaction related issues

  • What does an SqlSessionFactoryBean do when configured in XML?
  • What does MapperScannerConfigurer do if you add it to XML?
  • What happens after executing the query method of the Mapper interface?
  • How do tx:advice/, AOP :config tags create transaction facets?
  • Why can annotated transactions be used when tags are added?
  • Why Transaction rolled back was reported because it has been marked as rollback-only?
  • Can the Transactional annotation be applied to private or protected methods?
  • What are the propagation properties of transactions for, and what are nested transactions for?
  • Why is the transaction not rolled back when an exception is thrown?
  • How are Spring transactions thread-safe?

Spring IOC questions

  • What is IOC?
  • Talk about your understanding of the design idea of inversion of control?
  • How to understand the Spring IOC container?
  • How many IOC containers are available in Spring?
  • How does Spring IOC manage dependencies between beans and avoid circular dependencies?
  • Understanding dependency injection for the Spring IOC container?
  • What are the singleton patterns and advanced features of Spring IOC?
  • What is the difference between a BeanFactory and a FactoryBean, and what is the difference between a BeanFactory and an ApplicationContext?
  • How does Spring address loop dependencies during Bean creation?
  • What about design patterns during Spring Bean creation?

Notes related issues

  • What kind of programming idea is annotations?
  • Why is it possible to directly use @AutoWired for dependency injection? How does it work?
  • How does Spring automatically inject Bean properties and Map/List collections via @autoWired?
  • How does @required check that the attributes in the XML are configured?
  • How does the Spring framework inject beans labeled @Component into containers?
  • How do @Configuration, @ComponentScan, @import, @Bean annotations work?
  • Using @propertysource to import a configuration file, how does the configuration file register with the Spring environment?
  • Explain how to implement a simple tree document generation with custom annotations.

Questions about proxy mode

  • Why is the proxy pattern needed?
  • What are the advantages and bottlenecks of the static proxy pattern?
  • Understanding how the Java interface proxy pattern works?
  • How do I implement dynamic proxies using Java reflection?
  • Specific enhancements to the Java interface proxy pattern?
  • Talk about the implementation of Cglib class enhanced dynamic proxy?

How to learn systematically and correctly

I think there are three dimensions:

  • What problem was this framework created to solve?
  • What is the core idea of this framework?
  • What scenarios does this framework apply to?

Speaking of thought, I think the soul of programming is thought, and programming without thought is no different than salt fish. “Don’t reinvent the wheel” sounded grand at the time, but NOW I think it can only be true in one respect. Me, why should learn above all how to make the wheel – because you will build the wheels, using someone else’s wheels would understand the principle, and use it every time you will be handy, if you have a framework to understand just stay in, use more skilled stage, then you are a livestock “code”, someone can replace you at any time.

Say so much actually want to tell you to learn framework to understand the underlying principles of the framework, to master is the most commonly used principles. In this I share an open source framework of the system of thinking learning tree diagram to everyone, I hope to be able to provide some help to friends in need, source documents can be obtained in the end of the free way!

Learning ‘

The above mentioned interview questions and faQs about Spring have been summarized into some documents and guide notes which will be shared with you for free! In terms of the current domestic interview mode, it is very important to actively prepare for the interview and review the entire Java knowledge system before the interview. It is quite responsible to say that whether you are fully prepared for the interview will directly affect your success rate of entry. But many of you don’t have the right materials to review your entire Java body of knowledge, or you may not know where to start. I came across a handout (PDF) that was a very technical handout, both from a Java body of knowledge and from an interview perspective.

Write in the last

Shimo.im /docs/f2ajdN…