본문 바로가기

Programming!

Bean Mapper/Transformer Mapper/Transformer bull-bean-transformer : https://github.com/HotelsDotCom/bull HotelsDotCom/bull BULL - Bean Utils Library. Contribute to HotelsDotCom/bull development by creating an account on GitHub. github.com Mapstruct : https://mapstruct.org/ MapStruct – Java bean mappings, the easy way! Java bean mappings, the easy way! Get started Download mapstruct.org Orika : https://github.com/orika-m.. 더보기
QueryDSL Predicate Builder 추가 조건관련 작업시 아래처럼 엔티티별 별도의 Predicate를 사용하기는 하는데 가끔 보기 싫을 때가 있다. 기존에는 아래처럼 조건을 별도로 구분해서 나눈 후, allOf로 조합처리 했는데. public static Predicate containsBrandName(BrandFindCondition condition) { BooleanBuilder builder = new BooleanBuilder(); if (!StringUtils.isEmpty(condition.getBrandName())) { builder.and(qBrandEntity.brandName.contains(condition.getBrandName())); } return builder; } public static Predicate c.. 더보기
사용을 잘 안해서... IntelliJ에서 cmd+shift+a 를 누를때 갑자기 command 터미널이 열리고 man 이 실행된다. 엌... 흠.. 뭐지..싶다가 대충 찾아보니 Mac OS 단축키가 등록되어 있다고.. 해제시키고 문제 없음을 확인. ㅎㅎㅎㅎ 더보기
IntelliJ 에서 JUnit 5 실행 실패. Error : No tests found for given includes 두가지 처리 방법. 1. IntelliJ에 테스트 실행 변경. - Run tests using을 Gradle에서 IntelliJ IDEA로 변경 후 실행한다. 2. build.gradle 파일내 플랫폼 지정. test { .... outputs.dir snippetsDir useJUnitPlatform() } 어짜피 혼자 개발 하는 것은 아니니... 2번 방법을 추천. (Gradle로 플젝 생성시 기본적으로 useJUnitPlatform() 이 등록되어 있는데 왜 빠져있던거지..) 더보기
json object 상호 변환시 lombok으로 인한 boolean 기본형 오류 오늘 옆 동료분이 restful 관련 json 변환시 boolean에 속성의 한 필드가 이럴경우 저럴경우 오류가 생기고 안생긴다고 한다. 대충 보니 이름 문제같은 느낌적인 느낌이 들고, 마침 다른 동료도 해당 이슈에 대해 처리했던 경험을 얘기해 줘서 한번 보기로 함. 자 lombok의 @Data 로 생성된 boolean 을 보자. property를 isResult로 했지만 Lombok에 의해 생성된 메소드는 isResult, setResult이다. 그럼 그냥 result로 한다면?... 똑같다. 흠.. 이상도 하지.. 그럼 Boolean 타입이라면? 어어... get/set이 is앞에 붙어버린다. is가 없는 경우도 당연히~ 즉, @Data를 쓸경우 의도와는 다르게 처리될 수 있기 때문에 꼭 네이밍을 확.. 더보기