Java 为什么@InterceptorRef在列表上载文件中不起作用

Java 为什么@InterceptorRef在列表上载文件中不起作用,java,upload,struts2,annotations,Java,Upload,Struts2,Annotations,当我对列表使用自己的@InterceptorRef注释时,列表为空。我很困惑,因为默认的拦截器工作,然后列表中有两张选定的图片。作为预防措施,我只在第一个拦截器上试过,它也不起作用。我不知道我做错了什么。请帮帮我 我的带有注释的操作方法如下所示 @Action(value = "fileUploading", results = { @Result(name = "success", location = "nextGui.jsp"), @Result(name = "input

当我对列表使用自己的@InterceptorRef注释时,列表为空。我很困惑,因为默认的拦截器工作,然后列表中有两张选定的图片。作为预防措施,我只在第一个拦截器上试过,它也不起作用。我不知道我做错了什么。请帮帮我

我的带有注释的操作方法如下所示

@Action(value = "fileUploading", results = { @Result(name = "success", location = "nextGui.jsp"),
        @Result(name = "input", location = "testGui.jsp") }, interceptorRefs = {
                @InterceptorRef(params = { "allowedTypes", "image/jpeg,application/zip", "maximumSize",
                        "100000000" }, value = "fileUpload"),
                @InterceptorRef("defaultStack"), @InterceptorRef("validation") })
public String upload() throws Exception {
    for (File file : fileUpload) {
        System.out.println("File :" + file);
    }
    for (String fileName : fileUploadFileName) {
        System.out.println("Filename : " + fileName);
    }
    for (String fileContentType : fileUploadContentType) {
        System.out.println("File type : " + fileContentType);
    }
    System.out.println("Ende");
    return SUCCESS;
}

默认拦截器堆栈包括文件上载拦截器。在每个配置中定义两次可能会产生意外的结果。如何覆盖此上载侦听器?在将其定义到操作配置时,将完成侦听器覆盖。若你们需要了解更多,你们可以阅读答案。我收到一条错误消息,在删除@InterceptorRef(“defaultStack”)后,错误不再出现。但清单上也没有任何内容。