Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mój FolderDto
- public class FolderDto {
- private int id;
- private String path;
- public FolderDto(int id, String path) {
- this.id = id;
- this.path = path;
- }
- public int getId() {
- return id;
- }
- public String getPath() {
- return path;
- }
- }
- Mój Response
- public class FolderDtoListResponse {
- private List<FolderDto> result = new ArrayList<>();
- public FolderDtoListResponse(List<FolderDto> result) {
- this.result.addAll(result);
- }
- public List<FolderDto> getResult() {
- return result;
- }
- }
- Wykorzystanie w FolderController
- @RequestMapping(name = "/", method = GET)
- public List<FolderDto> returnFoldersList() {
- return new FolderDtoListResponse(service.getFoldersList());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement