configInterceptor (Interceptors me)


This method is used to configure the global interceptor of JFinal. The global interceptor will intercept all action requests unless cleared in the Controller using @Clear. The following code configures an interceptor named AuthInterceptor.

public void configInterceptor(Interceptorsme)
{ me.add(newAuthInterceptor());
}


JFinal's Interceptor is very similar to Struts2, but it is more convenient to use. The Interceptor configuration granularity is divided into three levels: Global, Class, and Method. The above code configuration granularity is global. Class and Method level Interceptor configuration will be introduced in detail in subsequent chapters.