完全不是表单 - 而是表单提交的操作。SpringSecurityCore grails插件打破了我的(以前的工作)分段上传形式
请告诉我发生的事情是SpringSecurity被包裹在自己的请求上下文的请求显然有很多安全性在里面发生的事情。我的动作,捕捉这条线从形式断POST请求:
def f = request.getFile('myFile')
与错误消息:
No signature of method: org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper.getFile() is applicable for argument types: (java.lang.String) values: [myFile]
任何人都知道如何从请求的实际文件?
编辑:没关系,我的问题似乎与JMeter的不是文件设置正确的MIME类型。我刚刚遇到了完全相同的事情。正如戴夫所说,上传配置正确并且正在工作,那么当我们启用Spring Security时,它会中断。根据错误消息,我在考虑使用Spring Security RequestWrapper来代替Grails通常自动使用的Multipart封装器。 – Robert 2012-02-24 13:23:11