반응형 반응형 자바6 반응형 API 문서 자동화 - Swagger //gradle implementation 'io.springfox:springfox-swagger2:2.8.0' implementation 'io.springfox:springfox-swagger-ui:2.8.0' //maven io.springfox springfox-swagger2 2.8.0 io.springfox springfox-swagger-ui 2.8.0 package com.spring2.nyong.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.confi.. 2022. 8. 19. java DTO,VO List 정렬 list.stream().sorted(Comparator.comparing(DTO::getId)).collect(Collectors.toList()) 2022. 8. 19. SptringBoot Rest Api Exception @RestControllerAdvice : Exception 발생 시 JSON으로 반환받기 위하여 생성합니다. @ExceptionHandler: Bean에서 발생하는 에러를 잡아 처리합니다 전역의 예외를 잡긴하되 패키지 단위로 제한 할 수 도 있다. @RestControllerAdvice("com.example.demo.login.controller") @RestControllerAdvice(basePackages = "com.spring2.nyong.api") @RequiredArgsConstructor @RestControllerAdvice(basePackages = "com.spring2.nyong.api") public class ExceptionAdvice { private final Respo.. 2022. 5. 31. 자바 dto,vo 리스트 정렬 list sort myFolderList.stream().sorted(Comparator.comparing(ContentDTO::getContent_id)).collect(Collectors.toList()) 2022. 4. 21. 이전 1 2 다음 반응형