2017-03-03 9 views
0

私はStormpath + Spring MVCを使用しています。 添付ファイル付きのリクエストを送信しようとすると問題が発生します。Stormpath multipartFile

public ModelAndView insert(@RequestParam("files") MultipartFile files[], @Valid @ModelAttribute("ordemServico") OrdemServico ordemServico, 
           BindingResult result, Model model) throws IOException { 

しかし、私は、以下のこのエラーを得た...

2017-03-03 17:00:34,395 ERROR [qtp504672873-22] c.s.s.c.StormpathAuthenticationEntryPoint Couldn't resolve content type 
com.stormpath.sdk.servlet.http.UnresolvedMediaTypeException: No MediaType could be resolved for this request (text/css,*/*;q=0.1) and the configured producesMediaTypes settings (application/json,text/html). The ContentNegotiationResolver was not able to come up with a valid MediaType. 
    at com.stormpath.sdk.servlet.filter.DefaultContentNegotiationResolver.getContentType(DefaultContentNegotiationResolver.java:59) 

とそのショーアクセス拒否エラー...

これを解決する方法は?ありがとう。

答えて

0

解決策が見つかりました。 春のセキュリティは私のhtml形式でこのような構成と...

をデアップロードをブロックしました。私にとっては

<form method="POST" action="XXX?${_csrf.parameterName}=${_csrf.token}" enctype="multipart/form-data"> 

その作品...

関連する問題