Introduction of the spring

Three layer architecture

  • 1. Presentation layer: Web layer, MVC is a design model of presentation layer
  • 2. Service layer: Service layer
  • 3. Persistence layer: DAO layer

Two basic features IoC and AoP

  • IoC: Inversion of control. That is, the programmer no longer directly controls the creation of object instances, but the container controls the creation of objects.
  • 2.AoP: Section-oriented programming method. For a system, functions that span multiple points are calledCross focus, such asLogging, declarative transactions, security, caching, and moreIn OOP, the key unit of modularity is the class. In AOP, the key unit of modularity is the aspect.

architecture

Spring provides about 20 modules, and developers can choose some of them based on actual needs, not all of them.