-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Team-18 새리,Starve][BE] 숙소 조회 및 예약에 관한 기본 API 구현 #62
Open
Jiwon-JJW
wants to merge
123
commits into
codesquad-members-2021:team-18
Choose a base branch
from
Jiwon-JJW:Dev/BE
base: team-18
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 104 commits
Commits
Show all changes
123 commits
Select commit
Hold shift + click to select a range
4979428
chore: init setting
Jiwon-JJW a750048
feat: default domain setting
Jiwon-JJW 761605e
chore: init DB setting
Jiwon-JJW 59499ed
chore: schema setting
Jiwon-JJW 59abef2
chore: init data setting
Jiwon-JJW 46d8c5e
Merge pull request #12 from Jiwon-JJW/BE/init-data
sallyjellyy 6edd3dc
chore: add property_category
Jiwon-JJW 27c0ed8
chore: property_category insert문 생성
Jiwon-JJW 4ae7d17
refactor: ImageUrl 필드, 게터 추가
sallyjellyy 3b186ac
feat: Category 구현
sallyjellyy 68d9a97
Merge pull request #13 from Jiwon-JJW/BE/init-data
sallyjellyy 3310a64
Merge pull request #14 from Jiwon-JJW/BE/domain
Jiwon-JJW e711d0e
chore: image_url로 이름변경
Jiwon-JJW 02e7179
chore: build.gradle 테스트 설정 변경
sallyjellyy 2919482
feat: Location 클래스의 로거 기록용 toString과 생성자 수정
sallyjellyy 48ecf28
feat: LocationDAO 구현
sallyjellyy 84dd0a2
test: LocationDAOTest 구현
sallyjellyy 58481dd
feat: findAll 구현
sallyjellyy 92be2b6
test: findAll 테스트 구현
sallyjellyy 22b865e
feat: 카테고리 테이블 생성 및 데이터 추가
sallyjellyy bb9a629
feat: CategoryDAO 구현
sallyjellyy 6122150
test: CategoryDAO 테스트 코드 작성
sallyjellyy 07f7a61
chore: Property_detail table에 rating 항목 추가
Jiwon-JJW 58ce60b
feat: search 시, List를 출력하기 위한 DTO 생성
Jiwon-JJW cbb4581
feat: 생성자와 toString 메서드 생성
Jiwon-JJW 5e32eb6
feat: table Entity 생성
Jiwon-JJW 307c2c8
feat: Property를 쿼리로 불러오는 DAO 클래스 생성
Jiwon-JJW ea8f40f
test: PropertyDaoTest 클래스 생성
Jiwon-JJW 9e3b6d3
feat: Image를 DB에서 따로 빼오는 방식으로 메서드 수정.
Jiwon-JJW d8d0bca
refactor: 생성자에 id 추가
sallyjellyy b73bca3
refactor: 카테고리 생성자에 id 추가로 코드변화
sallyjellyy 88d3c96
refactor: 중복코드 제거
sallyjellyy e51a686
feat: 메인에 보낼 데이터용 DTO 생성
sallyjellyy 98e194e
feat: 메인페이지용 비지니스 로직을 가질 MainService 생성
sallyjellyy 8b247e2
feat: 메인컨트롤러 구현
sallyjellyy 8bd954d
test: LocationDAOTest에 아이디값을 체크하는 테스트 구문 추가
sallyjellyy 9253e7b
refactor: Image 로직 분리한 것 String으로 추출 하는것으로 수정 및 쿼리 수정
Jiwon-JJW a6a24b9
feat: 검색 컨트롤러 생성
Jiwon-JJW 94566b8
chore: wish_list 데이터 입력
Jiwon-JJW 0ba1150
Merge pull request #17 from Jiwon-JJW/BE/api/main
Jiwon-JJW 6396602
Merge pull request #18 from Jiwon-JJW/BE/API/serch
sallyjellyy e1c14a5
feat: Reservation 클래스 구현
sallyjellyy f4596a4
chore: table Insert에 rating 항목 추가
Jiwon-JJW 1028aae
test: PropertyDaoTest에 LocalDate 변수 추가
Jiwon-JJW 8b5446d
feat: ReservationDAO 구현
sallyjellyy 95eb6fa
refactor: CheckIn, CheckOut 날짜 기간을 계산해서 totalPrice 입력하는 방식으로 변경
Jiwon-JJW 223132a
test: ReservationDAO의 insert, findById, findByUserId를 테스트
sallyjellyy ccc96e7
refactor: reservation 테이블에 id 컬럼 추가
sallyjellyy 835d374
feat: 로케이션 아이디로 프로퍼티의 가격만 받아오는 메서드 구현
sallyjellyy 46d1d55
test: 로케이션 아이디로 프로퍼티 가격을 받아오는 메서드 테스트
sallyjellyy e011acd
feat: PropertyService 생성 및 평균 가격 구하는 메서드 구현
sallyjellyy 08d29c8
test: 평균 가격을 구하는 averagePriceTest 코드 구현
sallyjellyy d8a25c7
feat: 그래프를 그릴 때 필요한 propertyCounts를 구하는 메서드 구현
sallyjellyy 107db5c
test: propertyCount 메서드 테스트
sallyjellyy 1c98261
feat: PriceSearchDTO 구현
sallyjellyy 946e30c
feat: PriceSearchDTO를 만들어 내보내는 메서드 구현
sallyjellyy e07ac11
chore: image 항목에 thumbnail boolean을 넣어, 메인으로 쓸 이미지인지 구분 하는 기능 추가
Jiwon-JJW 8c6d182
refactor: search시, 이미지 리스트가 아닌, 썸네일 이미지만 나올 수 있도록 기능 수정.
Jiwon-JJW 1a89732
Merge pull request #20 from Jiwon-JJW/BE/API/serch
sallyjellyy 2a2f9c7
Merge branch 'Dev/BE' into BE/api/reservation
sallyjellyy 01f7231
Merge pull request #21 from Jiwon-JJW/BE/api/reservation
Jiwon-JJW b0ea9b4
Merge pull request #22 from Jiwon-JJW/BE/api/priceSearch
Jiwon-JJW 08aa7d6
chore: host 항목 추가
Jiwon-JJW 99b2930
feat: PropertyDetail을 찾아오는 메서드와 DTO 추가
Jiwon-JJW e9a943f
chore: findBy부분을 Service로 이동.
Jiwon-JJW 9e7b61a
chore: 사용하지 않는 항목 삭제
Jiwon-JJW d7286a6
refactor: name에서 title로 이름 변경
Jiwon-JJW 33ebf6d
style: 코드 정리
sallyjellyy d78f83c
refactor: PropertyController 생성하여 방 상세보기 지원
Jiwon-JJW 475f397
Merge pull request #23 from Jiwon-JJW/BE/API/property-detail
sallyjellyy 3096065
style: Dto -> DTO로 클래스 이름 변경
Jiwon-JJW 9fd1ef3
style: Dao -> DAO로 클래스 이름 변경
Jiwon-JJW 96f6b9a
Merge branch 'Dev/BE' of https://github.com/Jiwon-JJW/airbnb into Dev/BE
Jiwon-JJW 44a99bf
refactor: PropertyController에서 날짜 형식 인식 못하는 문제 때문에 수정 진행
Jiwon-JJW d3bb75d
feat: 상세 예약정보를 받아내는 메서드, 쿼리 생성
sallyjellyy dfe816c
test: 상세 예약정보 받아오는 테스트
sallyjellyy feddf76
feat: 예약정보에 관한 서비스, 컨트롤러 구현
sallyjellyy 796218b
Merge pull request #24 from Jiwon-JJW/BE/api/reservation
Jiwon-JJW e4c3623
refactor: 상세 예약정보 DTO에 이미지 필드와 게터, 세터 추가
sallyjellyy 449601c
refactor: 이미지 매핑 추가
sallyjellyy cc405bf
test: 로거 추가로 알맞은 디테일 정보를 받아왔는지 테스트
sallyjellyy b145bea
refactor: PropertyDetailDTO 삭제 후, ResponseDTO로 합침.
Jiwon-JJW d410c67
refactor: PropertyDTO에 위도, 경도 항목 추가.
Jiwon-JJW 0374715
refactor: PropertyDetailDTO 삭제로 인한 메서드 수정
Jiwon-JJW acf4d12
Merge branch 'Dev/BE' of https://github.com/Jiwon-JJW/airbnb into BE/…
sallyjellyy 30cfdae
feat: 새로운 예약을 만들기 위한 ReservationRequestDTO 구현
sallyjellyy 1e048c0
feat: 클라이언트로부터 받은 예약정보로 가격정보를 계산해서 넘겨줄 PriceInfoDTO 구현
sallyjellyy 31a6956
refactor: Reservation 클래스의 생성자 변경
sallyjellyy 6603ef8
feat: 예약 상세정보 불러오는 기능 구현
sallyjellyy b087f47
feat: 새로운 예약정보로 가격정보 불러오는 기능, 새로운 예약을 만들어 저장하는 기능 구현
sallyjellyy 237f081
refactor: 코드정리 및 optimize import
sallyjellyy b367837
refactor: 코드정리 및 optimize import
sallyjellyy 6b3beb4
Merge pull request #26 from Jiwon-JJW/BE/api/reservation
Jiwon-JJW 21c4437
feat: WishList 조회를 위한 Controller 추가
Jiwon-JJW 7661072
feat: WishList 조회를 위한 query 추가
Jiwon-JJW db9459c
Refactor: DAO내에서 처리하던 Image 세팅 로직을 Service로 옮김
Jiwon-JJW ad69a73
Refactor: RowMapper 분리 및 코드 정리 작업 진행
Jiwon-JJW 246e4cc
Merge pull request #27 from Jiwon-JJW/BE/Refactor
sallyjellyy 4f64b2d
refactor: dto 내부 패키지 추가로 dto 클래스 정리
sallyjellyy a2734d3
refactor: 리턴타입을 ResponseEntity로 감싸서 응답코드까지 반환하도록 수정
sallyjellyy 1b32801
refactor: 사용되지 않는 세터 메서드 삭제
sallyjellyy f07f0d3
refactor: 코드 정리
sallyjellyy a42d386
Refactor: JdbcTemplate -> NamedParameterJdbcTemplate으로 변경
Jiwon-JJW 0203e34
Merge pull request #28 from Jiwon-JJW/BE/refactor
Jiwon-JJW d1dc552
feat: getLatitude, getLongitude 메서드 추가
Jiwon-JJW f03ccdc
chore: RDS로 연결할 수 있도록 세팅 변경
sallyjellyy a587cfc
Merge branch 'Dev/BE' of https://github.com/Jiwon-JJW/airbnb into Dev/BE
Jiwon-JJW 8bf99bb
Merge pull request #34 from Jiwon-JJW/BE/Refactor
Jiwon-JJW 49f0b49
Merge branch 'Dev/BE' of https://github.com/Jiwon-JJW/airbnb into Dev/BE
Jiwon-JJW d7a4554
feat: getLatitude, getLongitude 메서드 추가
Jiwon-JJW 6815f0a
feat: jastpyConfig를 이용한 application.properties 암호화
Jiwon-JJW 7a1e246
Merge branch 'Dev/BE' of https://github.com/Jiwon-JJW/airbnb into Dev/BE
sallyjellyy e125809
refactor: 사용되지 않는 클래스 삭제
sallyjellyy e312bbc
refactor: 코드리뷰 반영
sallyjellyy cfb3c6a
fix: 컨플릭트 해결
sallyjellyy 3cab370
Merge pull request #35 from Jiwon-JJW/BE/review-refactor
Jiwon-JJW 81d22ae
feat: 위치와 예약 로우매퍼 분리
sallyjellyy f32d1a7
refactor: 리뷰 반영
sallyjellyy 0941198
Merge pull request #37 from Jiwon-JJW/BE/review-refactor
Jiwon-JJW 30287dc
refactor: RequestParam 을 Class로 Mapping 하여 수정
Jiwon-JJW 8916508
Update PropertyDAOTest.java
Jiwon-JJW ceef85e
chore: Default 값 추가
Jiwon-JJW 514197d
Merge pull request #38 from Jiwon-JJW/BE/refactor-Review
sallyjellyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '2.4.5' | ||
id 'io.spring.dependency-management' version '1.0.11.RELEASE' | ||
id 'java' | ||
} | ||
|
||
group 'com.codesquad.airbnb' | ||
version = '0.0.1-SNAPSHOT' | ||
sourceCompatibility = '1.8' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc' | ||
implementation 'org.springframework.boot:spring-boot-starter-web' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
runtimeOnly 'mysql:mysql-connector-java' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
#!/usr/bin/env sh | ||
|
||
# | ||
# Copyright 2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
############################################################################## | ||
## | ||
## Gradle start up script for UN*X | ||
## | ||
############################################################################## | ||
|
||
# Attempt to set APP_HOME | ||
# Resolve links: $0 may be a link | ||
PRG="$0" | ||
# Need this for relative symlinks. | ||
while [ -h "$PRG" ] ; do | ||
ls=`ls -ld "$PRG"` | ||
link=`expr "$ls" : '.*-> \(.*\)$'` | ||
if expr "$link" : '/.*' > /dev/null; then | ||
PRG="$link" | ||
else | ||
PRG=`dirname "$PRG"`"/$link" | ||
fi | ||
done | ||
SAVED="`pwd`" | ||
cd "`dirname \"$PRG\"`/" >/dev/null | ||
APP_HOME="`pwd -P`" | ||
cd "$SAVED" >/dev/null | ||
|
||
APP_NAME="Gradle" | ||
APP_BASE_NAME=`basename "$0"` | ||
|
||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' | ||
|
||
# Use the maximum available, or set MAX_FD != -1 to use that value. | ||
MAX_FD="maximum" | ||
|
||
warn () { | ||
echo "$*" | ||
} | ||
|
||
die () { | ||
echo | ||
echo "$*" | ||
echo | ||
exit 1 | ||
} | ||
|
||
# OS specific support (must be 'true' or 'false'). | ||
cygwin=false | ||
msys=false | ||
darwin=false | ||
nonstop=false | ||
case "`uname`" in | ||
CYGWIN* ) | ||
cygwin=true | ||
;; | ||
Darwin* ) | ||
darwin=true | ||
;; | ||
MINGW* ) | ||
msys=true | ||
;; | ||
NONSTOP* ) | ||
nonstop=true | ||
;; | ||
esac | ||
|
||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar | ||
|
||
|
||
# Determine the Java command to use to start the JVM. | ||
if [ -n "$JAVA_HOME" ] ; then | ||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then | ||
# IBM's JDK on AIX uses strange locations for the executables | ||
JAVACMD="$JAVA_HOME/jre/sh/java" | ||
else | ||
JAVACMD="$JAVA_HOME/bin/java" | ||
fi | ||
if [ ! -x "$JAVACMD" ] ; then | ||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME | ||
Please set the JAVA_HOME variable in your environment to match the | ||
location of your Java installation." | ||
fi | ||
else | ||
JAVACMD="java" | ||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
Please set the JAVA_HOME variable in your environment to match the | ||
location of your Java installation." | ||
fi | ||
|
||
# Increase the maximum file descriptors if we can. | ||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then | ||
MAX_FD_LIMIT=`ulimit -H -n` | ||
if [ $? -eq 0 ] ; then | ||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then | ||
MAX_FD="$MAX_FD_LIMIT" | ||
fi | ||
ulimit -n $MAX_FD | ||
if [ $? -ne 0 ] ; then | ||
warn "Could not set maximum file descriptor limit: $MAX_FD" | ||
fi | ||
else | ||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" | ||
fi | ||
fi | ||
|
||
# For Darwin, add options to specify how the application appears in the dock | ||
if $darwin; then | ||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" | ||
fi | ||
|
||
# For Cygwin or MSYS, switch paths to Windows format before running java | ||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then | ||
APP_HOME=`cygpath --path --mixed "$APP_HOME"` | ||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` | ||
|
||
JAVACMD=`cygpath --unix "$JAVACMD"` | ||
|
||
# We build the pattern for arguments to be converted via cygpath | ||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` | ||
SEP="" | ||
for dir in $ROOTDIRSRAW ; do | ||
ROOTDIRS="$ROOTDIRS$SEP$dir" | ||
SEP="|" | ||
done | ||
OURCYGPATTERN="(^($ROOTDIRS))" | ||
# Add a user-defined pattern to the cygpath arguments | ||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then | ||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" | ||
fi | ||
# Now convert the arguments - kludge to limit ourselves to /bin/sh | ||
i=0 | ||
for arg in "$@" ; do | ||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` | ||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option | ||
|
||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition | ||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` | ||
else | ||
eval `echo args$i`="\"$arg\"" | ||
fi | ||
i=`expr $i + 1` | ||
done | ||
case $i in | ||
0) set -- ;; | ||
1) set -- "$args0" ;; | ||
2) set -- "$args0" "$args1" ;; | ||
3) set -- "$args0" "$args1" "$args2" ;; | ||
4) set -- "$args0" "$args1" "$args2" "$args3" ;; | ||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; | ||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; | ||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; | ||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; | ||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; | ||
esac | ||
fi | ||
|
||
# Escape application args | ||
save () { | ||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done | ||
echo " " | ||
} | ||
APP_ARGS=`save "$@"` | ||
|
||
# Collect all arguments for the java command, following the shell quoting and substitution rules | ||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" | ||
|
||
exec "$JAVACMD" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
@rem | ||
@rem Copyright 2015 the original author or authors. | ||
@rem | ||
@rem Licensed under the Apache License, Version 2.0 (the "License"); | ||
@rem you may not use this file except in compliance with the License. | ||
@rem You may obtain a copy of the License at | ||
@rem | ||
@rem https://www.apache.org/licenses/LICENSE-2.0 | ||
@rem | ||
@rem Unless required by applicable law or agreed to in writing, software | ||
@rem distributed under the License is distributed on an "AS IS" BASIS, | ||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
@rem See the License for the specific language governing permissions and | ||
@rem limitations under the License. | ||
@rem | ||
|
||
@if "%DEBUG%" == "" @echo off | ||
@rem ########################################################################## | ||
@rem | ||
@rem Gradle startup script for Windows | ||
@rem | ||
@rem ########################################################################## | ||
|
||
@rem Set local scope for the variables with windows NT shell | ||
if "%OS%"=="Windows_NT" setlocal | ||
|
||
set DIRNAME=%~dp0 | ||
if "%DIRNAME%" == "" set DIRNAME=. | ||
set APP_BASE_NAME=%~n0 | ||
set APP_HOME=%DIRNAME% | ||
|
||
@rem Resolve any "." and ".." in APP_HOME to make it shorter. | ||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi | ||
|
||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" | ||
|
||
@rem Find java.exe | ||
if defined JAVA_HOME goto findJavaFromJavaHome | ||
|
||
set JAVA_EXE=java.exe | ||
%JAVA_EXE% -version >NUL 2>&1 | ||
if "%ERRORLEVEL%" == "0" goto execute | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:findJavaFromJavaHome | ||
set JAVA_HOME=%JAVA_HOME:"=% | ||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
|
||
if exist "%JAVA_EXE%" goto execute | ||
|
||
echo. | ||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
echo. | ||
echo Please set the JAVA_HOME variable in your environment to match the | ||
echo location of your Java installation. | ||
|
||
goto fail | ||
|
||
:execute | ||
@rem Setup the command line | ||
|
||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
|
||
|
||
@rem Execute Gradle | ||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* | ||
|
||
:end | ||
@rem End local scope for the variables with windows NT shell | ||
if "%ERRORLEVEL%"=="0" goto mainEnd | ||
|
||
:fail | ||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of | ||
rem the _cmd.exe /c_ return code! | ||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 | ||
exit /b 1 | ||
|
||
:mainEnd | ||
if "%OS%"=="Windows_NT" endlocal | ||
|
||
:omega |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rootProject.name = 'BE' | ||
|
11 changes: 11 additions & 0 deletions
11
BE/src/main/java/com/codesquad/airbnb/AirbnbApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.codesquad.airbnb; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class AirbnbApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(AirbnbApplication.class, args); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
BE/src/main/java/com/codesquad/airbnb/controller/MainController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,24 @@ | ||||||||||||||||||||||||
package com.codesquad.airbnb.controller; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
import com.codesquad.airbnb.dto.MainDTO; | ||||||||||||||||||||||||
import com.codesquad.airbnb.service.MainService; | ||||||||||||||||||||||||
import org.springframework.beans.factory.annotation.Autowired; | ||||||||||||||||||||||||
import org.springframework.http.ResponseEntity; | ||||||||||||||||||||||||
import org.springframework.web.bind.annotation.GetMapping; | ||||||||||||||||||||||||
import org.springframework.web.bind.annotation.RestController; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
@RestController | ||||||||||||||||||||||||
public class MainController { | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
private MainService mainService; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
@Autowired | ||||||||||||||||||||||||
public MainController(MainService mainService) { | ||||||||||||||||||||||||
this.mainService = mainService; | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
@GetMapping("/main") | ||||||||||||||||||||||||
public ResponseEntity<MainDTO> getMain() { | ||||||||||||||||||||||||
return ResponseEntity.ok().body(mainService.browseMainDTO()); | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 되도록이면 ResponseEntity의 사용은 정말 필요한 경우가 아니라면 지양해주세요. |
||||||||||||||||||||||||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.gitignore는 초기단계에 직접 정의해주시기보다는
gitignore.io 같은 곳에서 preset을 가져오신다음
필요한 부분을 조정해서 사용해주시길 추천드리겠습니다~