[QueryDSL] join, paging, where, dto Qclass
·
JPA
사용 이유 jpa nativeQuery로 쿼리 조회를 하다가 다중 필터를 사용하게 되면서, where절을 유동적으로 사용하기위해 사용 // 설문조사 리스트 조회 @Query(value = "SELECT sc.content, s.* " + "FROM survey s left join survey_category sc on sc.sur_cat_id = s.category_id " + "WHERE 1=1 " + "and s.status = 'I' " + "and s.is_private = 'N' " "and s.category_id = :categoryId " , nativeQuery = true) Page findByCategoryIdAndStatus(@Param("categoryId") int catego..
[Keycloak] OAuth2 MSA에서 키클록 SSO Spring Security 연동 (1) dependency 추가, gateway/auth 서비스 설정
·
Spring
개발환경macOSSpring Boot 2.7.5 RELEASEJAVA 11 1. MSA 서비스 구조서비스 디스커버리 패턴으로 gateway 서비스(api gateway)를 통해 각 서비스의 api를 호출하는 형태입니다.auth 서비스를 통해 회원가입/로그인 등 계정 및 권한을 관리합니다. (키클록 토큰 발급)  2. gateway 서비스 설정0) 프로젝트 구조📦gatewayserver ┣ 📂src ┃┣ 📂main ┃ ┃ ┣ 📂java ┃ ┃ ┃ ┗ 📂com ┃ ┃ ┃ ┃ ┗ 📂cloud ┃ ┃ ┃ ┃ ┃ ┗ 📂gatewayserver ┃ ┃ ┃ ┃ ┃ ┃ ┣ 📜GatewayserverApplication.java ┃ ┃ ┃ ┃ ┃ ┃ ┗ 📜SecurityConfig.java ┃ ┃ ┗ ?..