restful-return
SpringBoot based return value types are supported by browsers.
As easy as counting.
<dependency>
<groupId>io.github.xiaoxunyao</groupId>
<artifactId>restful-return</artifactId>
<version>0.0.3</version>
</dependency>
@GetMapping("/demo")
public Result demo(){
List<String> list = new ArrayList<>();
for (int i = 0; i < 10; i++){
list.add(String.valueOf(i));
}
return Result.internalServerError(list);
}