私は郵便配達員を通じてリクエストをヒットしようとしました。私はいくつかの問題に直面しています。私は郵便配達にAWS認証でこれを設定します -AWS APIゲートウェイ:計算したリクエストの署名が、指定した署名と一致しません
「アクセスキー: - XXXXXXXXXX
秘密鍵:-xxxxxxxxxx
AWS地域: - AP-南-1
サービス名: - execute-api "。 はをGETしながら、私はこのエラー
{ "message": "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.\n\nThe Canonical String for this request should have been\n'POST\n/dms/api/v1/filestore/file\n\ncontent-length:29940\ncontent-type:multipart/form-data\nhost:e7ffona9b4.execute-api.ap-south-1.amazonaws.com\nx-amz-date:20170714T111258Z\n\ncontent-length;content-type;host;x-amz-date\n15c77e9022d5c4e9de523e7279515d245695c76115ebabe7517119701f9ae963'\n\nThe String-to-Sign should have been\n'AWS4-HMAC-SHA256\n20170714T111258Z\n20170714/ap-south-1/execute-api/aws4_request\nb0e6151f24eb3a4aa5520da442bdafe7625a44ed7c15f3109eeb78eef038a6cd'\n" }
を得た
POSTながら、私はこの
@RestController
@requestmapping(value = "/v1/filestore")
public class FileUploadController {
@Autowired
private IFileStoreService fileStoreService;
@CrossOrigin
@ResponseBody
@RequestMapping(value = "/file/{id}", method = RequestMethod.GET)
とのように何かをしたコードでは、この
{ "message": "No method found matching route api/v1/filestore/file for http method GET." }
を得ましたapplication.properties私は私が間違っていた場合、私に正しい引数をリードし、この問題を解決するために私を助けてください
server.contextPath=/api
を設定します。
おかげで
あなたの要求をセキュリティなしでチェックしましたか? – Sergii
ええ、私はそれも同じエラーが表示されますが、No Authを選択して、郵便配達でリクエストを取得しようとすると、 '{" message ":" Missing Authentication Token "}'と表示されます。 –
あなたのサーバーにセキュリティモジュールがないことを意味します。デバッグを簡略化するセキュリティをオフにするだけで、問題のローカライズを行うことができます – Sergii