Skip to content
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-20 / BE - Dong] 숙소 조회, 좋아요를 누른 숙소 기능 #53

Open
wants to merge 85 commits into
base: team-20
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
c6004d8
first commit
moto6 May 17, 2021
5df79d2
feat: Dto 멤버 내용 추가
malaheaven May 18, 2021
b208d6f
imges upload
moto6 May 18, 2021
7368a12
Merge pull request #12 from d-h-k/BE/feature/7/dto
moto6 May 18, 2021
fe312e7
Merge pull request #13 from d-h-k/BE/feature/8/img
moto6 May 18, 2021
c01cc96
feat: Dao 샘플을 구현
malaheaven May 18, 2021
e741cf0
웹페이지 아이콘 추가
moto6 May 18, 2021
a7f1c93
오어스 기능 구현을 위한 백엔드 간이 페이지 구성
moto6 May 18, 2021
072654e
oauth 기능 구현을 위한 GithubAccessTokenResponse 객체 추가
moto6 May 18, 2021
b5ccf2a
oauth 기능 구현을 위한 부수적인 것들
moto6 May 18, 2021
38e54c8
세션 사용을 위한 그레이들 셋팅
moto6 May 19, 2021
2d33f86
Update README.md
moto6 May 19, 2021
e213a24
github oauth 를 통해 jwt 토큰 얻어오는데 성공
moto6 May 19, 2021
6fa8b25
메인페이지에 팝업 해 줄 정보들을 백엔드에서 보내주도록 파일 생성
moto6 May 19, 2021
caeb0b7
메인페이지에 팝업 해 줄 정보들을 백엔드에서 보내주도록 로직과 데이터 추가
moto6 May 19, 2021
f606880
메인페이지에 팝업 해 줄 정보들을 백엔드에서 보내주도록 로직과 데이터 추가
moto6 May 19, 2021
bb2a613
Merge pull request #18 from d-h-k/BE/feature/14/daoSample
moto6 May 19, 2021
3f0d9a8
Merge pull request #22 from d-h-k/team-20
moto6 May 20, 2021
881152e
Merge branch 'dev-BE' into BE/feature/15/oauth
moto6 May 20, 2021
5910b30
Merge pull request #23 from d-h-k/BE/feature/15/oauth
moto6 May 20, 2021
fa1e9c0
Merge pull request #24 from d-h-k/BE/feature/16/suggestions
moto6 May 20, 2021
bb37c23
숙소 관련 JDBC Templete 필드변수 추가
moto6 May 20, 2021
2d59ce2
숙소 평점 저장을 위해 Double 형으로 저장
moto6 May 20, 2021
9ddb4ac
숙소 목업 API (/airbnb) 제공을 위한 수정
moto6 May 20, 2021
d3a88b6
숙소검색 API에서 모든 데이터가 전달되지 않는 문제 해결
moto6 May 21, 2021
0c8edb4
데이터 7곳의 숙소 정보가 리턴되도록 다섯개의 데이터 셋 추가
moto6 May 21, 2021
85532c4
숙소 이미지 데이터셋 추가
moto6 May 21, 2021
35939cc
숙소 이미지 데이터셋이 나오도록 변경
moto6 May 21, 2021
e20903f
숙소 이미지 데이터셋이 나오도록 수정
moto6 May 21, 2021
7f1bdf5
그레이들 컴파일 에러 해결을 위해서 11버전 >> 8로 변경
moto6 May 21, 2021
708f32d
배포 스크립트 추가
moto6 May 21, 2021
0cf7b0b
(iOS)위시리스트 누른 숙소 리스트 돌려주기 #45
moto6 May 21, 2021
0b83000
branch protection test
moto6 May 21, 2021
7264fb5
기본적인 테스트 코드작성
moto6 May 22, 2021
234fbe4
숙소 검색결과 리스트를 리턴해줄때 검색쿼리스트링을 포함해(에코잉으로) 보내주도록 기능 수정
moto6 May 22, 2021
30fda05
숙소 검색할때 검색조건을 쿼리스트링으로 받는다.
moto6 May 23, 2021
a9fc813
불필요한 메서드 정리
moto6 May 23, 2021
4e5a483
Merge pull request #47 from d-h-k/BE/feature/40/query_echo
moto6 May 23, 2021
6e33895
Merge pull request #48 from d-h-k/BE/feature/33/testcode
moto6 May 23, 2021
4c0a085
Merge branch 'dev-BE' into BE/feature/45/likeAcmdOnly
moto6 May 23, 2021
7071657
Merge pull request #49 from d-h-k/BE/feature/45/likeAcmdOnly
moto6 May 23, 2021
8960038
불필요한 메서드 정리
moto6 May 23, 2021
b0fab3f
파라미터가 하나뿐인 생성자 추가
moto6 May 23, 2021
991a89d
데이터베이스 테스트코드 추가 및 정리
moto6 May 23, 2021
4693829
sql update
moto6 May 24, 2021
caf9567
프론트에서 쿼리스트링으로 체크인 체크아웃 날짜데이터를 문자열로 받았을때, 이를 LocalDate로 변환해주는 코드
moto6 May 25, 2021
6ffe52c
문자열에서 날짜로 변경할때 에러가 있는경우 런타임 익셉션을 발동시켜주는 클래스
moto6 May 25, 2021
6d03a47
기존 도메인 폴더에 있던 해당 클래스를 유틸클래스로 옮김
moto6 May 25, 2021
b0d7670
에어비엔비 프로젝트 기능 구현을 위한 Guest, Reservation 도메인 도입
moto6 May 25, 2021
3f631fd
의존 클래스 위치 변경 반영
moto6 May 25, 2021
2ba58da
불필요한 주석 삭제
moto6 May 25, 2021
428576b
불필요한 주석 삭제
moto6 May 25, 2021
9962bd4
Merge pull request #60 from d-h-k/BE/feature/26/recursive_query_for_s…
moto6 May 25, 2021
aa84c80
지역명 검색 리커시브 쿼리
moto6 May 25, 2021
32baea8
사용가능한 숙소 리스트에서 검색조건에 맞는 숙소를 반영할수 있는 코드 추가
moto6 May 25, 2021
58a325a
백엔드 목표관리용 마크다운파일 추가
moto6 May 25, 2021
aba8ddd
코드 리포매팅
moto6 May 26, 2021
7bad4df
불필요한 주석 삭제
moto6 May 28, 2021
73a5cf3
코드 정리/리포매팅
moto6 May 28, 2021
0145102
CORS 문제 대응을 위한 코드 삽입
moto6 May 29, 2021
051cd61
불필요한 개행 삭제
moto6 May 29, 2021
5beba08
Merge branch 'dev-BE' of https://github.com/d-h-k/airbnb into dev-BE
moto6 Jun 1, 2021
8f28657
변수명 가독성을 올리기 위해 적절한 언더스코어 활용
moto6 Jun 1, 2021
93dbe15
options 필드 추가
moto6 Jun 1, 2021
3d61c34
DAO ->> Repository 이름 변경
moto6 Jun 1, 2021
ab8c0cb
Option 필드 데이터 추가
moto6 Jun 1, 2021
1d6456f
Option 필드 데이터 추가
moto6 Jun 1, 2021
656383d
Accommodation 필드 에러 수정
moto6 Jun 1, 2021
fa03abc
Auth 인증 관련 프론트엔드 협조요청사항 반영
moto6 Jun 2, 2021
87e9308
잘못된 데이터 수정
moto6 Jun 2, 2021
d16baab
FE 요청- location추가 issue #87
moto6 Jun 3, 2021
e18e28a
fe측과 oauth 연동 테스트
moto6 Jun 3, 2021
ac9d42e
FE 요청대응 ) auth 정보 리턴시 DTO를 만들어서 사용자 정보 추가해서 보내줌
moto6 Jun 3, 2021
051911f
숙소 정보를 추가하는 API 추가 >>미완성 상태 1단계
moto6 Jun 3, 2021
4eb38ed
프론트엔드 요청으로 깃헙 프로필사진 정보도 같이 오도록 수정
moto6 Jun 3, 2021
e881c9f
코드 리포매팅
moto6 Jun 3, 2021
6dcfcbd
깃허브에서 유저 프로필 사진을 가져오도록 기능을 수정
moto6 Jun 4, 2021
27e74b6
좋아요 기능 추가
moto6 Jun 4, 2021
8e420b8
클라이언트 시크릿 코드 삭제
moto6 Jun 4, 2021
7f35069
Auth에 컨트롤러와 서비스 계층이 분리되지 않아서 부적절한 정보들이 컨트롤러 계층에 위치해 있던 문제 해결
moto6 Jun 6, 2021
a09cd2b
- 컴포넌트 주입을 필요한 부분에서만 받도록 수정
moto6 Jun 6, 2021
b5b47ec
불필요한 주석 삭제
moto6 Jun 6, 2021
73a95b0
숙소 검색 인원수 체크 로직을 기존에 서비스에서 SearchConditions 클래스로 이동
moto6 Jun 6, 2021
4219137
런타임 익셉션에서 메시지 정보가 부정확하던 것을 좀더 구체적이고 명확하게 수정함
moto6 Jun 6, 2021
5c80b23
불필요한 JWT 클래스제거
moto6 Jun 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion BE/a.txt

This file was deleted.

37 changes: 37 additions & 0 deletions BE/airbnb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.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/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
13 changes: 13 additions & 0 deletions BE/airbnb/Dong.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 요구조건

## 숙소관련
- 숙소(어커머데이션) 에다가 숙소 좌표 추가
- 사용가능한 숙소 리스트에서 검색조건에 맞는 숙소를 반영할수 있는 코드 추가해야함

## 예약관련
- 예약사항 확인하는 API 추가하기 >> 예약내역을 출력
- 예약사항 저장하는 POST 요청 추가하기


## 옵션
- 숙소 등록 홈페이지
32 changes: 32 additions & 0 deletions BE/airbnb/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
plugins {
id 'org.springframework.boot' version '2.4.5'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '8'

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'

implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
runtimeOnly 'mysql:mysql-connector-java'

developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'com.auth0:java-jwt:3.8.3'
implementation 'org.springframework.session:spring-session-core'

}

test {
useJUnitPlatform()
}
Binary file added BE/airbnb/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions BE/airbnb/gradle/wrapper/gradle-wrapper.properties
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.8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
185 changes: 185 additions & 0 deletions BE/airbnb/gradlew
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" "$@"
89 changes: 89 additions & 0 deletions BE/airbnb/gradlew.bat
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
1 change: 1 addition & 0 deletions BE/airbnb/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'airbnb'
13 changes: 13 additions & 0 deletions BE/airbnb/src/main/java/com/example/airbnb/AirbnbApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.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);
}

}
Loading