Spring annotated Spring object access spring-oriented section programming Spring MVC Framework
Advantages of 1.spring
Lightweight: Basic version of Spring frame approx. 2mb
Inversion of Control (IOC): Reverse the right of generating objects to the spring framework
Aspect-oriented (AOP): Extracts reusable functionality and then weaves these common features into the application at the right time. such as transaction management, permissions control, logging, performance statistics.
Underlying principle: Agent mode dynamic Proxy
The role of AOP: AOP does not help us solve any new problems, it simply provides a better way to solve existing problems with less effort, making the system more robust and more maintainable.
What is dependency injection and what is the role of dependency injection?
Control reversal Container: Reverse the generated object rights to spring's framework
The means of controlling inversion: Dependency Injection
The role of dependency injection: reduce inter-class coupling and avoid creating objects with new
What are the methods of spring's dependency injection
Attribute injection construction Method Injection factory method injection
Bean's life cycle
Default: Singleton Multiple example: Configuration Scope=protoype
Spring's interview