본문 바로가기

분류 전체보기93

(Spring AOP) AOP란? AOP 핵심 간단 정리 Spring AOP / AOP AOP(Aspect Oriented Programming) : 관점 지향 프로그래밍 Aspect : 모듈화 한 것. 주로 부가기능을 모듈화함. Target : Aspect를 적용하는 곳 (클래스, 메서드 .. ) Advice : 실질적으로 어떤 일을 해야할 지에 대한 것, 실질적인 부가기능을 담은 구현체 JointPoint : Advice가 적용될 위치, 끼어들 수 있는 지점. 메서드 진입 지점, 생성자 호출 시점, 필드에서 값을 꺼내올 때 등 다양한 시점에 적용가능 PointCut : JointPoint의 상세한 스펙을 정의한 것. 'A란 메서드의 진입 시점에 호출할 것'과 같이 더욱 구체적으로 Advice가 실행될 지점을 정할 수 있음 Spring에서 AOP구현은 프록시.. 2020. 1. 9.
(Spring Controller Logging) Spring에서 http request 로깅하기 - 1 Spring Controller Logging - Spring에서 http request 로깅하기 @GetMapping("/{code}") public ResponseEntity example( @PathVariable(name = "code") String code { final String requestUri = request.getRequestURI(); log.info(LogHelper .getMessageWithPrefix("Request URI : " + requestUri + " | code : " + code)); ... 요청을 처리할 때 호출되는 Controller Method의 최상단 부분 코드입니다. log.info(LogHelper.getMessageWithPrefix("Reques.. 2020. 1. 6.
Spring JPA의 사실과 오해 - NHN FORWARD >> 1. 연관관계 매핑 entity 매핑 , 연간관계 매핑 연관관계 매핑 - 보통 데이터 베이스의 FK로 관계를 엔티티의 객체참조로 옮기는 것 2. 매핑타입 @OnetoMany ... 보통 단방향 매핑으로 처리가 가능하다 하지만 onetoMany 관계에서 영속전이를 사용하여 저장할때 update쿼리가 뒤에 더 붙게됨 2.1 양방향 - 단방향 연관관계의 주인쪽 -> @MapsId("test") 반대쪽 -> mappedby 2.2 Fetch 전략 ToOne -> 기본 EAGER ToMany -> 기본 LAZY 2.3 N+1 문제 3. Spring Data JPA Repository - spring data repsitory - spring data jpa repository : 위 에서 paging, 메소드생성.. 2019. 11. 27.
[2019 정보처리기사 실기 3회] 공부 방법 및 시험 후기 및 자료 2019 정보처리기사 실기 3회 안녕하세요~ 이번 2019 정보처리기사 실기 3회를 보고 후기 남깁니다. 먼저, 저는 4년제 컴퓨터과 전공생이라 공부하기 수월했다고 생각해요. 비전공자 분들의 공부방법과 조금 차이가 있을 수 있겠지만 도움이 아예 안되는 글은 아닐꺼에요. 참고하셔서 시험 잘 보셨으면 좋겠고 비전공자 분들 화이팅 입니다! 2019 정보처리기사 실기 공부방법 제가 공부한기간은 12일 정도 되었던것 같아요. 10월에 휴일이 많아서 5일은 10시간, 나머지는 2~3시간 정도 공부하였습니다. 시험에 등록하고 나서 찾아보니 모든 글에서 기출을 강조했습니다. 그래서 먼저 인터넷으로 기출 자료를 수집하고 수집한 것중 가장 최근 문제를 실제 시험 보듯이 풀었어요. 물론 거의 틀릴 것이고 어렵겠지만 내가 어.. 2019. 11. 7.
(APM/Newrelic/Spring) Spring App 모니터링 적용2 - Newrelic Alert https://lion-king.tistory.com/39 (APM/Newrelic/Spring) Spring App 모니터링 적용 - Newrelic https://newrelic.com/devops/what-is-devops What Is DevOps - Explained | New Relic Learn how this modern software development methodology can help your organization improve collaboration across IT te.. lion-king.tistory.com 이전 포스트에서 NewRelic을 적용했다면 이번에는 NewRelic에 의해 모니터링 되고 있는 application의 상태에 따라 alert event를 발생시.. 2019. 9. 11.
(APM/Newrelic/Spring) Spring App 모니터링 적용 - Newrelic https://newrelic.com/devops/what-is-devops What Is DevOps - Explained | New Relic Learn how this modern software development methodology can help your organization improve collaboration across IT teams, accelerate deploy cycles, and deliver better customer experiences. newrelic.com - NewRelic 관점에서 데브옵스의 정의에 관한 글 자사 서비스는 MSA SpringBoot로 구성되어있고, 서버는 AWS EC2 인스턴스 여러개를 사용하며 빌드와 배포에 Jenkins, AWS Code.. 2019. 9. 11.
알비트 근무일지 JPA examples를 사용한 검색 구현 JPA Specification을 사용한 검색 Coocon 송금내역 스크래핑 데이터 계약건 ec2 인스턴스 세팅 및 DB세팅, API 연동 JPA CustomPhysicalNamingStrategy implements PhysicalNamingStrategy, Serializable 구현으로 해결 : Coocon의 테이블 및 컬럼명 대문자 언더스코어 컨벤션, 우리는 소문자 언더스코어 컨벤션 Front 개발자의 편의를 위해 Page 객체의 default 세팅 중 Page 객체 설정에 제한이 있어 CustomPageImpl extends PageImpl 를 구현 대출승인 후 대출 실행시 계약 데이터 생성 및 기간 / 회차에 따라 이율을 계산하여 상환 스케쥴 자동 생.. 2019. 7. 1.
(Spring)(Pageable) Page<F>에서 Page<T>로 바꾸는 클래스 public class TypeTranslator { public static Page domainPageToDTOPage(Page domainPage, String dtoClassName) throws ClassNotFoundException, IllegalAccessException, InstantiationException { List dtoList = new ArrayList(); Class dtoClass = Class.forName(dtoClassName); for (F e : domainPage) { Object dto = dtoClass.newInstance(); BeanUtils.copyProperties(e, dtoClass.cast(dto)); dtoList.add((T) dto); .. 2019. 6. 18.
(Spring)(Pageable) Page 객체의 구현체 PageImpl의 커스터 마이징 @JsonIgnoreProperties(value = {"pageable", "last", "totalPages", "totalElements", "size", "number", "first", "numberOfElements", "sort", "empty"}) public class CustomPageImpl extends PageImpl { @JsonCreator public CustomPageImpl(List content, Pageable pageable, long total) { super(content,pageable.getSort().isSorted() ? pageable : PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), .. 2019. 6. 18.