querydsl3 [Querydsl] java17 querydsl setting build.gradle plugins { id 'java' id 'org.springframework.boot' version '3.1.4' id 'io.spring.dependency-management' version '1.1.3' } group = 'study' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' .. 2024. 2. 22. [Spring] JPA Querydsl 사용하기 (group_concat 함수) 1. Querydsl 사용 설정 1-1) build.gradle 설정 querydsl-jpa : 실제 애플리케이션에서 Querydsl 을 사용할때 필요한 라이브러리 querydsl-apt : Q 클래스를 만드는 용도 // querydsl 버전 buildscript { ext { queryDslVersion = "5.0.0" } } plugins { id 'org.springframework.boot' version '2.7.3' id 'io.spring.dependency-management' version '1.0.13.RELEASE' id 'java' // querydsl 플러그인 id "com.ewerk.gradle.plugins.querydsl" version "1.0.10" } group = '.. 2022. 10. 19. [Spring] JPA Querydsl Unsupported expression Querydsl Unsupported expression 오류 해결 방법 .as()를 통해 alias 사용하기 qHolding.goods_cnt.sum().as("sumGoodsCnt"), Expressions.stringTemplate("group_concat({0})", qHolding.user.user_id).as("userIds") GoodsHoldingDto.java public class GoodsHoldingDto { private Long goodsId; private String goodsNm; private Integer sumGoodsCnt; private String userIds; @QueryProjection public GoodsHoldingDto(Long goodsId, St.. 2022. 10. 9. 이전 1 다음