apache / apache/servicecomb-java-chassis
@RequestPart cannot mapping string value,Required request part 'hostname' is not present
- 主要言語
- Java
- スター
- 1.9k
- フォーク
- 814
- 平均マージ
- 8日 23時間
- マージ済み PR(30日)
- 1
説明
ServerCode
```
@PostMapping("/uploadLog")
public String uploadAnalysisLog(@RequestPart String hostname, @RequestPart MultipartFile runLog)
```
ClientCode
```
MultiValueMap form = new LinkedMultiValueMap<>();
form.add("runLog", fileResource);
form.add("hostname", hostname);
HttpEntity> body = new HttpEntity<>(form, headers);
RestTemplate restTemplate = HttpRestClient.getRestTemplateCse();
String result = restTemplate.postForObject(UPLOAD_LOG_URL, body, String.class);
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Reproduce the multipart request using the uploadAnalysisLog endpoint and the RestTemplate.postForObject client shown in the issue. Trace how the @RequestPart hostname value is handled alongside runLog, then verify that the request is accepted without the required-part error.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, spring
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100