在我使用 struts.xml 配置我的 struts2-application 之前。但是我需要使用注释来实现新的应用程序。对于我的动作课,我使用了这样的注释
@Namespace("/public")
@InterceptorRefs(value = { @InterceptorRef(value = "authInterceptor"), @InterceptorRef(value = "defaultStack") })
@ResultPath(value = "/")
@Result(name = "error", location = "/test/error.jsp")
在 struts.xml 中,我为拦截器类设置名称,然后在拦截器堆栈中使用它。所以我看到对于我的 Action 类,我可以设置拦截器的名称(值 =“authInterceptor”),但是我可以在哪里为我的拦截器类设置这个名称??????还是使用注解无法实现拦截器的配置?