IT/java5 Lombok annotation 정리 접근자 @Getter -- 설정자 @Setter -- 생성자 @NoArgsConstructor 파라미터 없는 빈 생성자 생성 사용 시 주의 사항 필드들이 final로 생성되어 있는 경우에는 필드를 초기화할 수 없기 때문에 생성자를 만들 수 없고 에러가 발생한다. → @NoArgsConstructor(force=true) 옵션을 이용해 final 필드를 강제 초기화 시켜 생성자를 만들 수 있다. @Nonnull 같이 필드에 제약조건이 설정되어 있는 경우, 추후 초기화를 진행하기 전까지 생성자 내 null-check 로직이 생성되지 않는다. @AllArgsConstructor 모든 파라미터를 받는 생성자 생성 @RequiredArgsConstructor final이나 @NotNull이 붙은 변수들을 가진 생.. 2021. 10. 21. Spring boot + Swagger 3.0 dependency 추가 (gradle 기준) dependencies { ... implementation "io.springfox:springfox-boot-starter:3.0.0" compile 'io.springfox:springfox-swagger-ui:3.0.0' } 설정파일 추가 (SwaggerConfig.java) @Configuration public class SwaggerConfig { @Bean public Docket api() { return new Docket(DocumentationType.OAS_30) // open api spec 3.0 .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) ... 2021. 4. 13. eclipse에서 svn offline 설치하기 1. 수동으로 설치하기 SVN 플러그인 다운로드: http://www.eclipse.org/subversive/latest-releases.php Latest Releases - Eclipse Subversive | The Eclipse Foundation The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks. www.eclipse.org 원하는 버전을 다운로드한다. 내 경우에는 안정된 빌드로 다운받았다. 2016년에 나온 Subversive-4.0.5.I20170425-1700... 2020. 4. 28. Spring Boot study 메모 DevToolSpring Boot를 이용해서 웹을 개발할 때에는 DevTools를 포함한 상태에서 개발하는 것을 권장DevTools는 Controller의 소스를 수정하면 자동으로 Spring Boot를 재시작해주어 편리함dependency add : runtimeOnly 'org.springframework.boot:spring-boot-devtools' @Controller VS @RestController (Controller와 RestController의 차이점)전통적인 Spring MVC 컨트롤러와 Restful 웹서비스 컨트롤러의 주요 차이점은 HTTP Response Body가 생성되는 방식이다. 기존의 MVC 컨트롤러는 view기술을 사용하지만 Restful 웹서비스 컨트롤러는 객체를 반환.. 2019. 2. 27. 이전 1 2 다음