Commit 4da4fee
authored
Question 도메인에 QueryDsl 적용 (#57)
* build: QueryDsl 설정 적용
- Persistence 모듈에 적용
- Spring Boot 2.* 버전에 맞는 설정 적용
* build: QueryDsl Qclass에 checkStyle이 적용되지 않도록 수정
* build: Qclass 생성 경로 수정
- 자동으로 gitIgnore에 포함되도록 수정
* build: compileQueryDsl 을 수행하는 플러그인 제거
- 해당 플러그인은 Qclass 생성을 compileJava와 분리하여 단독적으로 사용하기 위한 플러그인이지만,
QClass 중복 생성 오류, 롬복 및 코틀린 코드 인식 불가능 오류등이 발생하여 제거
* build: QueryDsl 사용을 위한 JpaQueryFactory를 빈으로 등록
JpaConfig 클래스를 Persistence 모듈로 이동
* refactor: 문제의 댓글을 가져오는 쿼리 메소드를 QueryDsl로 수정
* refactor: QuestionRepository을 제네릭 기반으로 설정하여 재사용성 향상
* style: View - 면접식 문제 페이지 변수 수정
* refactor: MajorDescriptiveQuestion의 findAllSortedByIfApproved()메소드를 queryDsl로 변환
* refactor: Levels, Category, Approved에 따른 BooleanBuilder 만드는 로직을 인터페이스의 default로직으로 분리
- 재사용성 향상
* refactor: MajorMultipleChoiceQuestionJpaRepository에서 쓰이지 않는 쿼리 메소드 제거
* refactor: MajorMultipleChoiceDbService 삭제
- 기존 메소드를 MajorMultipleChoiceRepository에서 queryDsl로 구현
* refactor: MajorMultipleChoiceQuestionJpaRepository의 모든 커스텀 메소드를 MajorMultipleCHoiceQuestionRepository에서 QueryDsl로 구현
* refactor: QuestionQueryDslMaker가 Question에 국한되지 않도록 제네릭의 범위를 수정
* refactor: LicenseMultipleChoiceQuestionJpaRepository를 제거
- 모든 메소드를 QueryDsl기반의 LicenseMultipleChoiceQuestionRepository에 구현
* style: 패키지 구조 수정
* refactor: QuestionRepository가 제네릭 기반으로 수행되지 않도록 수정
- 스프링은 인터페이스가 아닌 구현체를 기준으로 빈을 등록되기 떄문에 제네릭 타입이 다르다고 다수의 빈이 생성되지 않음
- 쓰이지않는 JpaRepository 제거
* refactor: QuestionRepositoryService, QuestionRepository이 제네릭이 아닌 Question만을 반환하도록 수정
* build: Core 모듈이 JPA에 의존하도록 수정
JpaRepository를 바로 호출하도록하기 위함
* build: JPA가 모든 모듈에 적용되도록 수정
* refactor: QuesitonRepostoryService를 삭제하고 코어모듈이 JpaRepository의 기본 메소드를 바로 사용할 수 있도록 수정
* refactor: Core모듈이 Comment,Member의 JpaRepository를 사용하도록 수정
* style: Dsl을 사용하는 Repository가 클래스에 Dsl 키워드를 포함하도록 수정
* style: 코드 컨벤션 적용1 parent f5b7b46 commit 4da4fee
File tree
54 files changed
+601
-520
lines changed- application
- src
- main
- java/com/comssa/api
- config
- question
- controller/rest/license
- service/rest
- common/implement
- license/implement
- major/implement
- resources/templates
- test/java/com/comssa/api
- question
- license
- major
- admin/service/implement
- user/service/implement
- config
- core
- src/main/kotlin/com/comssa/core
- authuser/service
- comment/service
- member/service
- question/service/common
- persistence
- src/main/java/com/comssa/persistence
- comment/service
- config
- member
- repository
- service
- question
- repository
- jpa
- querydsl
- booleanbuilder
- service
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+601
-520
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
22 | | - | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
| 25 | + | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
0 commit comments