Skip to content

Commit a1be82b

Browse files
MinChul-Sonkworkbeedamilogjihyunhillparkfpal95
authored
Develop 브랜치 Main에 반영 (#76)
* feat: Initialize FastAPI app * chore: 프로젝트 패키지 설치, directory 설정 (#3) * chore: types 관련 사항 devDependency로 이동 (#3) * chore: yarn lock 추가 (#3) * feat: Spinner 추가 (#3) * feat: Styled Component theme 추가 * feat: RedirectToErrorPage 추가 (#3) * feat: home page 추가 (#3) * feat: routing을 위한 paths 추가 (#3) * feat: paths 기반 routes 구현 (#3) * feat: App에 Routes 추가 (#3) * feat: ReactDOM에 Router, Styles, App 추가(#3) * feat: router, spinner entry index 파일 추가 (#3) * [Chore/BE] H2 DB 연결을 위한 설정 및 JPA 기본 옵션 세팅 #13 (#14) * ⚙️ feat: yaml 작성 - h2 DB 연결 - JPA 옵션 설정 - SQL Log level 설정 * ⚙️ fix: h2 console을 사용하도록 변경 * [Feat/fe#10] HomePage 마크업, 스타일링 (#17) * chore: mainRed 수정, 불필요한 스타일 코드 삭제 (#10) * style: 코드 포맷팅 (#10) * chore: package 의존성 변경 (#10) * fix: imgae import 시 컴파일 에러 해결 (#10) * feat: Home Filter 구현 (#10) * feat: Header 추가 (#10) * feat: RestaurantCard 추가 (#10) * style: 코드 포맷팅 (#10) * feat: theme에 lightGray, lightRed 추가 (#10) * feat: Footer 추가 (#10) * feat: HomePage 구현 (#10) * Feat/be#6 (#21) * feat: Matzip 도메인 구현 * feat: Category 도메인 구현 * feat: Category, Matzip 엔티티 연관관계 매핑 * fix: Matzip도메인 내 typo 수정 * fix: Matzip 외래키 type 수정 * feat: MatzipReview 도메인 생성 * feat: Matzip, MatzipReview 연관관계 매핑 * fix: like 컬럼 예약어 사용으로 인한 변경 * fix: modifiedAt 칼럼 속성 변경 * fix: matzip fk 네이밍 수정 * style: 전체 코드 정렬 resolves #6 * refactor: 도메인 클래스 접근 레벨 제한 추가 * refactor: @NotNull 적용 및 setter 사용 지양 - NotNull : 컬럼 제약사항 not null 추가와 더불어 쿼리 보내기전 null 검사하기 위함 - Setter지양 : 접근자 닫고, 추후에 필요한 부분만 허용하기 위함 * refactor: 연관관계 주인에 따른 Matzip 연관관계 수정 - Matzip, MatzipReview 사이 연관관계 주인이 MatzipReview의 외래키이므로 Matzip 내 불필요한 연관관계 삭제 * refactor: 정적 팩토리 메서드 사용에 따른 생성자 접근제한자 수정 * refactor: Catgory, MatzipReview 생성자 생성 * [Feat] 공통 엔티티 추출 및 적용 (#23) * ⚙️ feat: sql을 콘솔창에 출력하도록 변경 * ⚙️ refactor: `@ManyToOne`의 불필요한 옵션 제거 * ⚙️ feat: 공통 엔티티 추출 - #22 - createdDate, lastModifiedDate - `@EntityListeners`와 `@MappedSuperClass`를 사용 * ⚙️ feat: jpa audition 애노테이션 추가 - #22 - 애플리케이션에서 사용하기 위해서 추가 * ⚙️ refactor: 공통 엔티티 상속 - #22 * ⚙️ refactor: 공통 엔티티 추상 클래스로 변경 - #22 * [Feat/fe#18] Place Page UI구현 (#24) * chore: material-ui 추가 (#18) * feat: Spinner UI 구현 (#18) * feat: StarRating UI 구현 (#18) * feat: PlaceCard 구현 (#18) * feat: PlaceHeader UI 구현 (#18) * feat: PlaceReview UI 구현 (#18) * feat: PlaceReviewCard UI 구현 (#18) * chore: component 이름 변경 RestaurantCard > PlaceCard(#18) * feat: ReviewInput UI 구현 (#18) * chore: component 이름 변경 RestaurantCard > PlaceCard Home적용(#18) * style: theme color gray 추가(#18) * feat: Place page 구현 및 라우팅 설정 (#18) * feat: SelectModal 기능 구현 (#18) * feat: PlaceCard에 상세페이지 라우팅 추가 (#18) * feat: PlaceHeader에 카테고리, 주소 UI 추가 (#18) * feat: PlaceReviewCard header 문구 수정 (#18) * chore: 패키지 업데이트 (#18) * feat: Carousel 구현 (#18) * feat: RecommendedPlace 구현 (#18) * feat: 필요 module import, style 업데이트 (#18) * feat: 추천 모델 (#5) * remove: 모델 생성 파일 삭제 (#5) * feat: 추천 훈련 모델 및 클러스터 id 리스트 생성(#5)) * [refactor] 도메인 수정 (#27) * refactor: Matzip 도메인 내 컬럼 추가 - 수정된 DB 내용에서 추가된 4개의 칼럼 도메인에 반영 * refactor: Matzip 엔티티 좋아요 컬럼 수정 기획에 따라 좋아요 컬럼을 평균 평저믕로 수정 * refactor: MatzipReview 내 불필요한 컬럼 삭제 익명 게시판을 변경하여 username, password 컬럼이 불필요해짐에 따라 삭제 * refactor: MatzipReview - rating 컬럼 추가 유저가 댓글을 작성하면서 메긴 맛집 점수 반영 * refactor: 시간 데이터 타입에 따라 변수 renaming close issue #25 * refactor: naverUrl 필드 추가 지도 정보 제공에 따라 네이버 지도에 해당하는 url 필드 추가 * refacotor: 기본형 타입을 웨퍼로 수정 * feat: Add Ignore File (.cli_usage) into .gitignore - A file that FastAPI Run Usage command is Included * feat: Server API structure (FastAPI) - main.py (Endpoint: [POST] /recommend/{item_id}) - Port Number 8000 * feat: Model / Cluster Meta File moved to `utils` / Helpers - DBHelper - MLHelper * [Feat/fe#19] Edit Page 마크업 (#30) * feat: BackButton 재사용 컴포넌트 구현 (#19) * feat: GradientButton 재사용 컴포넌트 구현 (#19) * feat: TextInput 재사용 컴포넌트 구현(#19) * style: theme.js colors 색상 객체로 수정 및 반영 (#19) * feat: Editor page 라우팅 추가(#19) * feat: SelectBox 재사용 컴포넌트 구현 (#19) * feat: StarRating에 default parameter 추가(controlled) (#19) * feat: BackButton 제거 및 적용 (#19) * feat: EditorForm 구현 (#19) * feat: Editor Page 구현 (#19) * docs: ML Server Usage - ml-server/README.md * docs: ML Server Usage (#4) - ml-server/README.md * feat: Server API structure (FastAPI) - #4 - main.py (Endpoint: [POST] /recommend/{item_id}) - Port Number 8000 * feat: Model / Cluster Meta File moved to `utils` / Helpers - #4 - DBHelper - MLHelper * docs: ML Server Usage (#4) - ml-server/README.md * [Feat] 전체 조회 API 구현 (#29) * ✨ test: 전체 맛집 리스트 조회 WebMvcTest - #26 * ✨ fix: JpaAudition Config 파일로 분리 - #26 - 메인 애플리케이션에 `@EnableJpaAudition`으로 인해 테스트코드까지 전파되지 못하는 문제 발생 - 별도의 Config 파일로 분리하여 오류 해결 * ✨ feat: MatzipRepository 구현 - #26 - 전체 조회 - 가져와서 DTO로 변환하는 작업이 필요해 Service단에서 Paging 처리하도록 변경 * ✨ feat: MatzipService 구현 - #26 - 전체 조회 - List<Matzip>을 가져오고 DTO로 변환후 페이징 처리 - 읽기만하므로 readOnly = true * ✨ feat: 맛집 DTO 구현 - #26 - Record 클래스를 사용해서 구현 * ✨ feat: MatzipController 구현 - #26 - 클래스 레벨에 공통 패스인 `/api/matzip`을 등록해둠 - 맛집 전체 조회를 할 때 쿼리스트링이 없으면 첫번재 페이지 조회하도록 설정 * ✨ refactor: MatzipController 수정 - #26 - Pageable을 파라미터로 받도록 변경 - size의 default값은 12 * ✨ refactor: 전체 맛집 리스트 조회 로직 간소화 - #26 - 파라미터로 받은 Pageable을 바로 넘겨 받도록 처리 * ✨ refactor: 변경된 로직에 따른 테스트 코드 변경 - #26 * ✨ refactor: 컨트롤러 반환타입 명시 - #26 * ✨ fix: Pageable & Sort 오류 해결 - #26 - Pageable과 Sort를 같이 인자로 받으면 쿼리 메서드에서 오류 발생 - Service에서 새로운 Pageable을 만들어 Sort를 추가하는 것으로 문제 해결 * ✨ refactor: dto 네이밍 및 필드 수정 - #26 - 네이버 url과 주소에 대한 정보는 필요없다고 판단하여 제거 - 전체 조회용 dto와 상세 조회용 dto를 나누기위해 네이밍 변경 * [PR] DB 스키마 변경에 따른 SQL Query 변경 (#34) (#38) * hotfix: Fix SQL Query because of modified DB Schema * hotfix: Fix SQL Query because of modified DB Schema (#34) * ✨ fix: Category enum으로 변경 - #35 (#37) - 카테고리는 사용자가 확장하지 않고 정해진 값이므로 도메인으로 볼 수 없다고 판단 - Enum과 `@Enumerated`를 활용해 Matzip 도메인의 컬럼으로 추가 * docs: ML Tech Stacks (#40) * [Feat] 카테고리 전체조회 api 구현 (#39) * refactor: Matzip 도메인 내 컬럼 추가 - 수정된 DB 내용에서 추가된 4개의 칼럼 도메인에 반영 * refactor: Matzip 엔티티 좋아요 컬럼 수정 기획에 따라 좋아요 컬럼을 평균 평저믕로 수정 * refactor: MatzipReview 내 불필요한 컬럼 삭제 익명 게시판을 변경하여 username, password 컬럼이 불필요해짐에 따라 삭제 * refactor: MatzipReview - rating 컬럼 추가 유저가 댓글을 작성하면서 메긴 맛집 점수 반영 * refactor: 시간 데이터 타입에 따라 변수 renaming close issue #25 * refactor: naverUrl 필드 추가 지도 정보 제공에 따라 네이버 지도에 해당하는 url 필드 추가 * refacotr: 기본형 타입을 웨퍼로 수정 * feat: categoryRepository 생성 * feat: 카테고리 항목 조회 DTO 개발 - 편의를 위해 Record 사용 - entity를 Dto로 변환하는 categoryToDto() 함수 추가 * feat: category 항목들을 조회하는 비즈니스 로직 추가 - stream을 사용하여 한번에 List로 반환해준다. * feat: category api에 매잎되는 컨트롤러 추가 - 카테고리 전체 항목을 조회하는 api 추가 * fix: conflict 수정 (#25) * refactor: categoryResponse 메소드 및 인자 수정 및 테스트작성 (#25) - category enum 선언에 따라 수정함. - categoryController 조회 api 테스트 : 조회된 카테고리의 리스트 사이즈로 확인 (enum에 선언된 갯수로, 8 이어야 통과하도록 함) * refactor: category 조회 api 리팩토링 불필요한 로직 삭제 * test: category 조회 api 테스팅 close #28 * [Feat] 새로운 맛집 등록 API (#41) * ✨ test: 새로운 맛집 저장 테스트 - #33 * ✨ feat: Matzip Request Dto 생성 - #33 * ✨ feat: 맛집 저장 서비스 로직 구현 - #33 * ✨ feat: 맛집 저장 컨트롤러 구현 - #33 * ✨ refactor: 불필요한 공백 삭제 * ✨ refactor: import 추가 * ✨ refactor: 맛집 생성자 변경 - 조회수와 평점은 처음 만들 시에 0이므로 파라미터에서 제거 * ✨ refactor: sonarLint 피드백 적용 * ✨ refactor: 메서드 네이밍 오타 수정 * ✨ refactor: 컨트롤러 메서드 명을 좀 더 자세히 변경 - register라는 이름은 너무 모호하다는 피드백 반영 * ✨ refactor: 바뀐 메서드 명에 따른 코드 수정 * ✨ refactor: 바뀐 메서드 명에 따른 코드 수정 및 테스트 코드에 given 추가 * ✨ refactor: 테스트 클래스 필드에도 private 접근 제어자 추가 * ✨ refactor: Google Code Style 적용 * [PR] Refactor Entity Field Type (#50) * refactor: 엔티티 필드 타입 변경 - rating - naverRating - price 위 타입에 따른 영향 범위: - Matzip - EntireMatzipResponse - MatzipRequest * refactor: 엔티티 필드 타입 변경 - rating - naverRating - price 위 타입에 따른 영향 범위: - MatzipControllerTest * [PR] ML OpenAPI 구축 (#56) * feat: OpenAPI * docs: OpenAPI 명세 추가 * feat: OpenAPI 구축 (#57) (#58) - 의존성 추가 - application.yaml 정의 * [Feat] 맛집 상제 조회 (#59) * ✨ feat: ReviewRepository 생성 #43 - 맛집 ID로 해당 Review를 출력하는 쿼리 메서드 생성 * ✨ feat: ReviewDTO 생성 #43 * ✨ feat: MatzipDTO 생성 #43 - 맛집에 대한 상세 정보와 해당하는 리뷰들이 포함 * ✨ feat: Matzip 조회 로직 구현 #43 * ✨ feat: Matzip 조회 컨트롤러 구현 #43 * ✨ feat: DTO 매핑 메서드 네이밍 변경 #43 * feat: OpenAPI 구축 (#57) (#58) - 의존성 추가 - application.yaml 정의 * ✨ feat: ReviewRepository 생성 #43 - 맛집 ID로 해당 Review를 출력하는 쿼리 메서드 생성 * ✨ feat: ReviewDTO 생성 #43 * ✨ feat: MatzipDTO 생성 #43 - 맛집에 대한 상세 정보와 해당하는 리뷰들이 포함 * ✨ feat: Matzip 조회 로직 구현 #43 * ✨ feat: Matzip 조회 컨트롤러 구현 #43 * ✨ feat: DTO 매핑 메서드 네이밍 변경 #43 * ✨ refactor: 불필요한 공백 제거 Co-authored-by: G1 <[email protected]> * [Feat/fe#11,#55] Home UI(pagination, myMenu) 구현 (#60) * fix: 게시물 등록시 유저 rating 제거 (#11) * feat: editor에 작성자 추가 (#11) * feat: Home에 pagination, local data 적용(#11) * feat: PlaceReviewCard StarRating 제거 (#11) * fix: Place page 상세 라우팅안되는 문제 해결 (#11) * feat: PlaceCard에 로컬 데이터 적용 (#11) * chore: axios 설치 (#11) * feat: axios interceptor, instance 구현 (#11) * refactor: SelectModal 외부에서 selection 리스트 받도록 리팩터링 (#55) * feat: MyMenu 구현 및 적용 (#55) * feat: PlaceReviewCard에 SelectModal 적용 (#55) * feat: Spinner 불필요한 UI 삭제 * feat: Home page recoil store 파일 추가 (#11) * [Feat] 맛집 리뷰 등록 (#61) * feat: Matzip 리뷰 등록 request Dto 생성 (#49) - mapToMatzipReview() : 리퀘스트에 대응하는 entity를 만들어준다. * fix: MatzipReview 정적 팩토리 메서드 static 키워드 추가 (#49) * feat: Matzip리뷰 등록 서비스 기능 구현 (#49) * feat: Matzip 리뷰 생성 API 추가 (#49) * fix: test 코드내 MatzipReviewService 주입 * style: google style code 정렬 closes #49 * [Feat] 카테고리별 필터 기능 (#62) * ✨ feat: 카테고리 조회 쿼리 메서드 생성 #44 * ✨ feat: 카테고리 조회 서비스 로직 구현 #44 * ✨ feat: 카테고리 조회 컨트롤러 구현 #44 * ✨ refactor: 통일성을 위해 dto 네이밍 변경 * ✨ refactor: 오타 수정 * ✨ refactor: 충돌해결하는 과정에서 누락된 부분 수정 * ✨ refactor: 예외처리 변경 - NoSuchElementException으로 변경 * feat: Schema 변경에 따른 SQL 수정 (#65) - naver_comments -> naver_comment * [Feat] 맛집 삭제 기능 (#63) * ✨ feat: 맛집 삭제 로직 구현 - #45 * ✨ feat: 맛집 삭제 컨트롤러 구현 - #45 * ✨ refactor: 응답 수정 - #45 - 200은 모두 동일하도록 통일 * [Feat] 맛집 리뷰 삭제 기능 구현 (#66) * feat: 맛집 리뷰 delete api 추가 (#48) * feat: 맛집 리뷰 삭제 비즈니스 추가 (#48) * [Feat] 맛집 수정 기능 (#69) * ✨ feat: 맛집 수정을 위한 메서드 추가 - #46 * ✨ feat: 맛집 수정 비즈니스 로직 구현- #46 * ✨ feat: 맛집 수정 컨트롤러 구현- #46 * ✨ refactor: 불필요한 import 삭제 * [Feat] 조회수 증가 기능 (#71) * ✨ feat: 조회수 증가 메서드 구현 - #70 * ✨ feat: 조회수 증가 로직 구현 - #70 * [Refactor] 맛집 리뷰 삭제시 맛집 평점에 반영 (#73) * chore: queryDsl 적용 (#68) * feat: 리파지토리 queryDsl 적용 (#68) * refactor: 리뷰 삭제후 평균 평점 업데이트 기능 수정 (#68) * feat: queryDsl 적용을 위한 entityManager 추가 (#68) * refactor: 평균 평점 업데이트 기능 추가로 서비스 호출 수정 (#68) * refactor: 맛집 리뷰 등록시 맛집 평점에 반영 (#67) (#74) * [Refactor] 응답 스펙 변경 (#75) * ✨ feat: Querydsl을 위한 인터페이스 생성 - #72 * ✨ feat: Querydsl을 위한 구현체 생성 - #72 * ✨ feat: JPAQueryFactory 스프링 빈으로 등록 - #72 * ✨ refactor: querydsl 메서드 적용 - #72 * ✨ refactor: JPAQueryFactory 주입 - #72 * ✨ refactor: 불필요한 쿼리 메서드 삭제 - #72 * ✨ refactor: Pageable 반환하도록 응답 변경 - #72 * ✨ refactor: 맛집 DTO 스펙 변경 - #72 - 해당 맛집 작성자 반환 * ✨ refactor: 테스트 임시 주석 - #72 * ✨ refactor: 오타 수정 - #72 Co-authored-by: G1.Jeon <[email protected]> Co-authored-by: Dami Kim <[email protected]> Co-authored-by: Dami Kim <[email protected]> Co-authored-by: jihyunPark <[email protected]> Co-authored-by: ykk <[email protected]>
1 parent a6eef4c commit a1be82b

File tree

97 files changed

+12204
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+12204
-25
lines changed

.gitignore

Lines changed: 161 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,164 @@ gradle-app.setting
158158
# JDT-specific (Eclipse Java Development Tools)
159159
.classpath
160160

161-
# End of https://www.toptal.com/developers/gitignore/api/java,intellij+all,react
161+
162+
# Created by https://www.toptal.com/developers/gitignore/api/python
163+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
164+
165+
### Python ###
166+
# Byte-compiled / optimized / DLL files
167+
__pycache__/
168+
*.py[cod]
169+
*$py.class
170+
171+
# C extensions
172+
*.so
173+
174+
# Distribution / packaging
175+
.Python
176+
build/
177+
develop-eggs/
178+
dist/
179+
downloads/
180+
eggs/
181+
.eggs/
182+
lib/
183+
lib64/
184+
parts/
185+
sdist/
186+
var/
187+
wheels/
188+
share/python-wheels/
189+
*.egg-info/
190+
.installed.cfg
191+
*.egg
192+
MANIFEST
193+
194+
# PyInstaller
195+
# Usually these files are written by a python script from a template
196+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
197+
*.manifest
198+
*.spec
199+
200+
# Installer logs
201+
pip-log.txt
202+
pip-delete-this-directory.txt
203+
204+
# Unit test / coverage reports
205+
htmlcov/
206+
.tox/
207+
.nox/
208+
.coverage
209+
.coverage.*
210+
.cache
211+
nosetests.xml
212+
coverage.xml
213+
*.cover
214+
*.py,cover
215+
.hypothesis/
216+
.pytest_cache/
217+
cover/
218+
219+
# Translations
220+
*.mo
221+
*.pot
222+
223+
# Django stuff:
224+
*.log
225+
local_settings.py
226+
db.sqlite3
227+
db.sqlite3-journal
228+
229+
# Flask stuff:
230+
instance/
231+
.webassets-cache
232+
233+
# Scrapy stuff:
234+
.scrapy
235+
236+
# Sphinx documentation
237+
docs/_build/
238+
239+
# PyBuilder
240+
.pybuilder/
241+
target/
242+
243+
# Jupyter Notebook
244+
.ipynb_checkpoints
245+
246+
# IPython
247+
profile_default/
248+
ipython_config.py
249+
250+
# pyenv
251+
# For a library or package, you might want to ignore these files since the code is
252+
# intended to run in multiple environments; otherwise, check them in:
253+
# .python-version
254+
255+
# pipenv
256+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
257+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
258+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
259+
# install all needed dependencies.
260+
#Pipfile.lock
261+
262+
# poetry
263+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
264+
# This is especially recommended for binary packages to ensure reproducibility, and is more
265+
# commonly ignored for libraries.
266+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
267+
#poetry.lock
268+
269+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
270+
__pypackages__/
271+
272+
# Celery stuff
273+
celerybeat-schedule
274+
celerybeat.pid
275+
276+
# SageMath parsed files
277+
*.sage.py
278+
279+
# Environments
280+
.env
281+
.venv
282+
env/
283+
venv/
284+
ENV/
285+
env.bak/
286+
venv.bak/
287+
288+
# Spyder project settings
289+
.spyderproject
290+
.spyproject
291+
292+
# Rope project settings
293+
.ropeproject
294+
295+
# mkdocs documentation
296+
/site
297+
298+
# mypy
299+
.mypy_cache/
300+
.dmypy.json
301+
dmypy.json
302+
303+
# Pyre type checker
304+
.pyre/
305+
306+
# pytype static type analyzer
307+
.pytype/
308+
309+
# Cython debug symbols
310+
cython_debug/
311+
312+
# PyCharm
313+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
314+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
315+
# and can be added to the global gitignore or merged into this file. For a more nuclear
316+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
317+
#.idea/
318+
319+
.cli_usage
320+
321+
# End of https://www.toptal.com/developers/gitignore/api/java,intellij+all,react,python

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,18 @@
3030

3131

3232
### Machine-Learning
33-
- 윤경님 적어주세요!
33+
- Languages
34+
- Python
35+
- SQL
36+
- mysql
37+
- FastAPI
38+
39+
- Pandas
40+
- matplotlib
41+
- seaborn
42+
- Model
43+
- Kmodes
44+
- kprototype
3445

3546
### Collaboration
3647
- Git, Github, Wiki

backend/build.gradle

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,71 @@
1+
buildscript {
2+
dependencies {
3+
classpath("gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10")
4+
}
5+
}
6+
17
plugins {
2-
id 'org.springframework.boot' version '2.6.3'
3-
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
4-
id 'java'
8+
id 'org.springframework.boot' version '2.6.3'
9+
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
10+
id 'java'
511
}
612

13+
apply plugin: "com.ewerk.gradle.plugins.querydsl"
14+
715
group = 'us.11stcorp.team-3'
816
version = '0.0.1-SNAPSHOT'
917
sourceCompatibility = '17'
1018

1119
configurations {
12-
compileOnly {
13-
extendsFrom annotationProcessor
14-
}
20+
compileOnly {
21+
extendsFrom annotationProcessor
22+
}
1523
}
1624

1725
repositories {
18-
mavenCentral()
26+
mavenCentral()
1927
}
2028

2129
dependencies {
22-
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
23-
implementation 'org.springframework.boot:spring-boot-starter-web'
24-
compileOnly 'org.projectlombok:lombok'
25-
developmentOnly 'org.springframework.boot:spring-boot-devtools'
26-
runtimeOnly 'com.h2database:h2'
27-
annotationProcessor 'org.projectlombok:lombok'
28-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
30+
implementation 'org.springdoc:springdoc-openapi-ui:1.6.6'
31+
implementation 'org.springdoc:springdoc-openapi-data-rest:1.6.6'
32+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
33+
implementation 'org.springframework.boot:spring-boot-starter-validation'
34+
implementation 'org.springframework.boot:spring-boot-starter-web'
35+
implementation 'com.querydsl:querydsl-jpa'
36+
compileOnly 'org.projectlombok:lombok'
37+
developmentOnly 'org.springframework.boot:spring-boot-devtools'
38+
runtimeOnly 'com.h2database:h2'
39+
annotationProcessor 'org.projectlombok:lombok'
40+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
41+
testImplementation("org.junit.vintage:junit-vintage-engine") {
42+
exclude group: "org.hamcrest", module: "hamcrest-core"
43+
}
2944
}
3045

3146
tasks.named('test') {
32-
useJUnitPlatform()
47+
useJUnitPlatform()
48+
}
49+
def querydslDir = "$buildDir/generated/querydsl"
50+
51+
querydsl {
52+
library = "com.querydsl:querydsl-apt"
53+
jpa = true
54+
querydslSourcesDir = querydslDir
55+
}
56+
57+
sourceSets {
58+
main {
59+
java {
60+
srcDirs = ['src/main/java', querydslDir]
61+
}
62+
}
63+
}
64+
65+
compileQuerydsl{
66+
options.annotationProcessorPath = configurations.querydsl
67+
}
68+
69+
configurations {
70+
querydsl.extendsFrom compileClasspath
3371
}

backend/src/main/java/us/stcorp/team3/hackathonproject/HackathonProjectApplication.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
@SpringBootApplication
77
public class HackathonProjectApplication {
88

9-
public static void main(String[] args) {
10-
SpringApplication.run(HackathonProjectApplication.class, args);
11-
}
12-
9+
public static void main(String[] args) {
10+
SpringApplication.run(HackathonProjectApplication.class, args);
11+
}
1312
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package us.stcorp.team3.hackathonproject.common;
2+
3+
import java.time.LocalDateTime;
4+
import javax.persistence.Column;
5+
import javax.persistence.EntityListeners;
6+
import javax.persistence.MappedSuperclass;
7+
import lombok.Getter;
8+
import org.springframework.data.annotation.CreatedDate;
9+
import org.springframework.data.annotation.LastModifiedDate;
10+
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
11+
12+
@EntityListeners(AuditingEntityListener.class)
13+
@MappedSuperclass
14+
@Getter
15+
public abstract class BaseTimeEntity {
16+
17+
@CreatedDate
18+
@Column(updatable = false)
19+
private LocalDateTime createdAt;
20+
21+
@LastModifiedDate
22+
private LocalDateTime lastModifiedAt;
23+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package us.stcorp.team3.hackathonproject.common.config;
2+
3+
import org.springframework.context.annotation.Configuration;
4+
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
5+
6+
@Configuration
7+
@EnableJpaAuditing
8+
public class JpaAuditionConfig {
9+
10+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package us.stcorp.team3.hackathonproject.common.config;
2+
3+
import com.querydsl.jpa.impl.JPAQueryFactory;
4+
import javax.persistence.EntityManager;
5+
import javax.persistence.PersistenceContext;
6+
import org.springframework.context.annotation.Bean;
7+
import org.springframework.context.annotation.Configuration;
8+
9+
@Configuration
10+
public class QuerydslConfig {
11+
12+
@PersistenceContext
13+
private EntityManager em;
14+
15+
@Bean
16+
public JPAQueryFactory jpaQueryFactory() {
17+
return new JPAQueryFactory(em);
18+
}
19+
}

0 commit comments

Comments
 (0)