1. Summary Struts2 is simply an interceptor stack or a series of interceptors. The default interceptor is used to process user requests, use OGNL, and form verification. The spring interceptor is mainly reflected in the transaction management of AOP. For example, the display of errors or exceptions logs is also achieved by configuring the spring log interceptor. As the name suggests, an interceptor intercepts some requests and processes them accordingly. In a broad sense, the interceptor of spring and struts2 works in the same way. But the functions are different. 2. In the ssh project, which of the struts interceptor, filter, and spring aop interceptor is called first depends on your web. how to configure xml first depends on the integration method you use when <filter> then <servlet> requests arrive at <servlet>. If action is created using Spring, spring is used first; the other is that action has a Spring factory reference, this has nothing to do with Spring. 3. What is the difference between spring's aop and struts2 interceptor? spring's AOP is a line-oriented implementation method and a dynamic proxy. You can check the dynamic proxy and reflection. the video is understood, however, Spring interceptor is widely applied in the framework mode. Struts interceptors are for Struts. For example, all SSH projects use AOP. If a simple STRUTS project uses the interceptor of Struts itself, the final effect of the two is the same; there is no difference for applications, but there are minor differences for the underlying implementation methods! The interceptor is an implementation of AOP. The struts2 interceptor uses the interceptor of xwork2! Spring's AOP is based on IoC, and its underlying architecture adopts a combination of dynamic proxy and CGLIB proxy. 4. AOP interceptor instance @ Aspect @ Component ("intercept ") public class Intercept {private Logger log = LoggerFactory. getLogger (CacheIntercept. class ); /*** intercept the action method under the package ** @ param pjp instance of the actual method * @ return the actual method or the return value of the process */@ Around ("execution (* package name. action (..)) ") public Object doAround (ProceedingJoinPoint pjp) throws Throwable {// obtain the actual method of blocking Object target = pjp. getTarget (); // obtain the class name String className = target. getClass (). getName (); log. debug ("Run doAround with class" + className); return pjp. proceed ();} is added to the configuration file: <context: annotation-config/> <context: component-scan base-package = "package name"/> <aop: aspectj-autoproxy/>