Spring Framework-01-01- Overview of Spring Framework


Spring official website www.spring.io

Usually 55+teacher 15+final 30=100


Insert picture description here

Spring Boot is the focus.

Introduction to Spring Framework

Insert picture description here

  • First-rate companies sell standards,
    second-rate companies sell services,
    third-rate companies sell goods

  • Session Bean, Entity Bean, Message Bean. These are the three most common Bean objects.

  • Spring is a lightweight framework that most servers can afford.

Object Oriented Review

Spring is based on object-oriented thinking.

Insert picture description here

Structural design principles: The principle of opening and closing (open for extension, but closed for modification), rely on the inversion principle (programs must rely on abstract interfaces, not on specific implementations. Simply put, it is required to program abstractions, not implementations Programming, which reduces the coupling between the client and the implementation module.).

Insert picture description here

Experiment three: further decoupling through the container (modified on the basis of experiment two)

Insert picture description here

Insert picture description here
Containers are similar to Maps.

Everything you need is put in the container, and you need it directly when you need it.

Insert picture description here

Insert picture description here

Insert picture description here

IoC 与 IN

Insert picture description here

  • IoC: Control is given to the other party, and others will find what is needed.
    People wash clothes, create tool interfaces, use tool interfaces, and use them for anything.

  • DI: IoC is a design principle, and DI embodies the design principle of IoC.
    There are three ways of dependency injection.

Insert picture description here

Insert picture description here

Insert picture description here

Insert picture description here
DI is implemented through interfaces, set, get methods, and constructors.

Spring components

Insert picture description here

  • Corn Container core container

  • Beans mainly manage Bean objects

  • AOP aspect-oriented programming, (a technology that realizes the unified maintenance of program functions through pre-compilation and dynamic proxy during runtime. AOP is a continuation of OOP, a hot spot in software development, and an important content in the Spring framework. A derivative paradigm of functional programming. The use of AOP can isolate various parts of business logic, thereby reducing the coupling between various parts of business logic, improving the reusability of programs, and improving the efficiency of development at the same time.)

  • Aspects is a framework dedicated to aspect programming

  • Data Access / Integration Data Access / Integration

  • JDBC will be encapsulated by Spring

  • OXM: used to manipulate XML files


Guess you like

Origin blog.csdn.net/qq_44627608/article/details/114311145