免責事項:この記事はブロガーオリジナル記事です、続くBY-SAのCC 4.0を著作権契約、複製、元のソースのリンクと、この文を添付してください。
まず、我々はコントローラで、このような方法を書きます
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/sesameSelfMentionPoint")
public class SesameSelfMentionPointController {
@PostMapping("/test")
public List<String> test(@RequestBody List<String> list) {
for (String s : list) {
System.out.println(s);
}
return list;
}
}
Accessインターフェイスは、質量参加のプロジェクトを開始する必要があります
- 対応するポストを要求する最初の必要性
- ヘッダーには、コンテンツタイプ、アプリケーション/ JSONに追加します
- 体内で生選択し、JSONを選択して、フィールド名を追加かっこを記入
- ポイントは、以下の結果を成功裏インタフェースにアクセスするためのボタンを送ります
[
"a",
"b",
"c"
]
敬具、郵便配達のテストでリストコレクションインタフェースは終わった、メッセージへの歓迎の注意、ありがとう!