1. The non-intrusive technology embodies the ability to freely select and assemble the various functional modules of the spring framework in the application system, and does not enforce that the class of the application system must inherit or implement an interface from a class of the spring framework's system API.
2. How to achieve a non-intrusive design goal
1) Applying the reflection mechanism to provide various functions through dynamic invocation, establish the core inter-group Beanfactory
2) Use the Beanwrapper and Beanfactory component classes in the spring framework to eventually achieve instance creation and attribute injection of objects
3) Advantages: Allows the development of the application system can be used in the environment of the free migration, do not need to modify the application system core function implementation of code
Let me explain briefly what I understand. Suppose everyone wants to plug the user code into a frame. An intrusive approach is to require that the user code "know" the framework's code to behave as a class that the user code needs to inherit from the framework . Non-intrusive does not require user code to introduce framework code information, from the writer's point of view, the existence of the framework is not detected. For example, when using struts, I needed to inherit some of the struts classes, when struts hacked into my code. with spring, there is no need to inherit spring-specific classes when writing some business classes, which can be used after configuration completion of dependency injection, when spring does not intrude into the code of my business class . intrusive allows user code to generate dependency on the framework, which cannot be used outside the framework and is not conducive to the reuse of code . But intrusive can make it easier for users to combine with the framework and make more use of the functionality provided by the framework. Non-intrusive code is not overly dependent and can be easily migrated to other places. But the way you interact with user code can be more complex. Both of these methods have their own pros and cons, the main look at the actual development of how to weigh.
simply put, non-intrusive is the class that does not inherit from the framework, but it can be used after the configuration completes the dependency injection!
Spring-intrusive and non-intrusive