Java & Spring
[SpringBoot] 레포지토리 메소드 사용 방법
애너테이션 @EntityGraph(attribute = "연관관계_매핑된_필드명") : 연관관계 매핑된 엔티티의 정보를 한 번의 쿼리에 같이 불러옴. 매핑만 되어있으면 { } 로 묶어 중복선택 가능 : 단, 엔티티의 연관관계 매핑이 된 상태에서만 적용되며, 매핑시 사용된 EAGER, LAZY 에 따라 데이터를 다르게 불러옴 : @OnToMany는 FetchJoin 기본값이 LAZY, @ManyToOne은 기본값이 EAGER @Query : 레포지토리의 쿼리 메서드에서 직접 JPQL 쿼리를 작성 가능 JPQL 1. select : 불러올 조건 설정. 메서드 시그니처의 findAll 이면, select * 와 같은 역할을 함 2. from : 엔티티를 선택. from Entity e 같은 방식으로 엔티티 지..
[SpringBoot] API 문서화 세팅 (asciidoctor)
Test 케이스 작성 테스트 케이스 작성 설명 링크 : https://radpro.tistory.com/285 index.adoc 작성 1. src 디렉토리안에 docs/asciidoc 경로 생성 2. index.adoc 파일 생성 3. 문서화 작성 방법 링크 : https://radpro.tistory.com/286 4. 작성 방법 예시 = stackOverFlow_Clone :sectnums: :toc: left :toclevels: 4 :toc-title: Table of Contents :source-highlighter: prettify lastModified: 2022.10.28 *** == AccountController === Account 로그인 .curl-request include::..
![[SpringBoot] 프로젝트 워크 플로우](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FGubDN%2FbtrQihwv3aD%2FAAAAAAAAAAAAAAAAAAAAAAC3-7X-wxaKc1HrFZAyTWcBnoggGfSG15z94Um9-1cV%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1756652399%26allow_ip%3D%26allow_referer%3D%26signature%3DOhLm%252BS6dHOZHBXHA11wSYOeoWCY%253D)
[SpringBoot] 프로젝트 워크 플로우
메인 플로우 : 기획 > 분석 > 설계 > 구현 > 시험 > 배포 서브 플로우 : Auditing > Mock 컨트롤러 구현 > Mock API 문서화( 프론트에 전달 ) > API 구현 & 테스트 & Git PR 반복 Aouditing : Git 레포 개설 및 SpringBoot 프로젝트 올림 Git 프로젝트 설정 build.gradle, yml (기본, local, server, 테스트), gitignore 설정 개발 환경 설정 Exception xceptionAdvice, ErrorResponse, 비즈니스 로직 Exception 상속 클래스, ExceptionCode Sequrity Config, dto, filter, handler, jwt, userdetails, utils 등 p6spy 로그..