Simple exploration of the working principle of spring

1. Spring principle

The core of the internal is IOC, dynamic injection, so that an object can be created without new and can be produced automatically. In fact, this is to use reflection in Java. Reflection is to dynamically create and call objects at runtime. Spring is to dynamically create objects and call methods in objects with xmlspring configuration files at runtime.

Another core of spring is AOP, which is aspect oriented programming. It can supervise and control a class of objects (that is, call the module you specify before and after calling the specific methods of such objects), so as to expand a module. These are achieved by configuring classes.

The purpose of spring is to make the relationship between objects (modules and modules) not related through code, but managed through configuration class description (spring dynamically assembles objects through reflection according to these configurations)

Remember: spring is a container. Only objects in the container will have these services and functions provided by spring.

1. There are two ways of agency:

3. Reflection

6. Seven modules of spring framework

Spring framework web project actual full code sharing

Description of common spring configuration and parsing classes

Simple login instance of spring MVC implemented by Java programming

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>