我正试图用一个带有弹簧mvc的api来公开它,然后用昂首阔步来记录它。
@RequestMapping(value="/entry/", method=RequestMethod.GET)
@ApiOperation(value = "Retrieves all diary entries persisted in the database",produces = "application/json" ,responseContainer = "List", response = Entry.class)
public List<Entry> getDiaryEntries() {
List<Entry> diaryEntries =new ArrayList<>();
diaryEntries.add(new Entry());
return diaryEntries;
}
当我看到招摇的ui时
[
数组内容看起来 undefined 虽然我指定了responseContainer =“List”,response = Entry.class。
我希望像
这样的东西[{ "title" : "" , "text":"" } ]