Skip to content

[4기 나영경] Springboot-jpa weekly 미션 1차 PR입니다. #323

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

Open
wants to merge 83 commits into
base: na-yk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
b54575c
# Project Settings
wisehero May 9, 2022
033f442
# 고객 CRUD
wisehero May 9, 2022
38cfb5f
# 영속성 컨텍스트 실습
wisehero May 10, 2022
2a46d05
# 엔티티 매핑 실습
wisehero May 10, 2022
5de7219
미션1 : JPA 소개(단일 엔티티를 이용한 CRUD를 구현)
JiyoungMa May 11, 2022
0a1accd
Transactional & Entity Manager 삭제 후, query 나가는거 확인 후 업데이트
JiyoungMa May 12, 2022
911751d
미션2 : 영속성컨텍스트(customer 엔티티를 이용하여 생명주기 실습)
JiyoungMa May 12, 2022
e865046
미션3 : 연관관계매핑(order, order_item, item의 연관관계 매핑 실습)
JiyoungMa May 12, 2022
f8782b4
# 엔티티 매핑 수정
wisehero May 13, 2022
7f14629
# 커밋 수정
wisehero May 11, 2022
26b7e96
# 이전 챕터 수정 사항 적용
wisehero May 13, 2022
0524b8f
# order-orderItem-item 연관관계 매핑
wisehero May 13, 2022
b6f2665
# 제목 수정
wisehero May 13, 2022
eb67b5f
:tada: init: gradle project init
dojinyou May 14, 2022
92ffd35
:heavy_plus_sign: chore: test에 lombok depdency 추가
dojinyou May 14, 2022
8ded31f
:white_check_mark: test(JDBC): JDBC를 이용한 db 접근 방식 실습 테스트
dojinyou May 14, 2022
032ac4a
:heavy_plus_sign: chore: mybatis 관련 depdency 추가
dojinyou May 14, 2022
2f8ffb1
:see_no_evil: chore: gitignore 추가
dojinyou May 14, 2022
3bde013
:sparkles: feat: customer 객체 및 mapper 생성
dojinyou May 14, 2022
556c624
:white_check_mark: test(Mybatis): Mybatis 관련 실습 테스트 코드 작성
dojinyou May 14, 2022
44b9a8e
:heavy_plus_sign: chore: Spring boot starter Data JPA dependency 추가
dojinyou May 14, 2022
505b56c
Update springboot-jpa/src/test/java/com/example/springbootjpa/mission…
JiyoungMa May 14, 2022
34a6569
# 피드백 반영
wisehero May 14, 2022
0bf5c62
:white_check_mark: test(JPA): JPA 동작 관련 실습 구현
dojinyou May 14, 2022
b4ca313
:truck: chore: 연습용 파일 package 수정
dojinyou May 14, 2022
d988eb9
:fire: chore: 연습용 파일 file 삭제
dojinyou May 14, 2022
1b803af
:wrench: chore: DataSource 관련 config class 생성
dojinyou May 14, 2022
6aa9202
:sparkles: feat(Customer): customerEntity 정의
dojinyou May 14, 2022
944afd0
:sparkles: feat(CustomerRepo): Jpa Repo 상속을 통한 CustomerRepository Int…
dojinyou May 14, 2022
5aeb6f5
:white_check_mark: test(CustomerRepo): CRUD 관련 테스트코드 작성
dojinyou May 14, 2022
95dc34a
:lipstick: style: 포맷 정리 및 불필요한 파일 삭제
dojinyou May 14, 2022
38c8931
:heavy_minus_sign: chore: 불필요한 Dependency 삭제
dojinyou May 15, 2022
0f266fd
:bug: fix: Entity 생성자 접근제어자 수정
dojinyou May 15, 2022
5afb1f3
Merge pull request #127 from dojinyou/main
dojinyou May 15, 2022
d3ee88c
Revert "[2기-C]유도진-Mission1:단일 엔티티를 이용한 CRUD를 구현"
learn-programmers May 15, 2022
7a48d64
Merge pull request #135 from prgrms-be-devcourse/revert-127-main
SpencerCP May 15, 2022
8d58a89
Merge pull request #98 from JiyoungMa/JiyoungMa/M2&3
JiyoungMa May 16, 2022
74ccbb0
Revert "[2기-P] 마지영 Mission 2: 영속성 컨텍스트 & Mission 3: 연관관계 매핑"
JiyoungMa May 16, 2022
83b21c8
Merge pull request #143 from prgrms-be-devcourse/revert-98-JiyoungMa/…
JiyoungMa May 16, 2022
17a1588
Merge pull request #118 from wisehero/wisehero/d3
ksy90101 Dec 11, 2022
635a580
Revert "[2기-C] 김지웅 JPA 연관관계 매핑 "
ksy90101 Dec 11, 2022
0e0b51b
Merge pull request #179 from prgrms-be-devcourse/revert-118-wisehero/d3
ksy90101 Dec 11, 2022
dd3c7c9
day1: JPA 소개(단일 엔티티를 이용한 CRUD를 구현)
na-yk Jul 25, 2023
6a07cd6
Merge branch 'main' of https://github.com/na-yk/springboot-jpa
na-yk Jul 25, 2023
03aa1d1
feat: CustomerApiController 추가
na-yk Jul 28, 2023
dca648c
feat: customer 전체 조회 페이지 적용
na-yk Jul 28, 2023
ef88423
feat: User 엔티티 추가
na-yk Aug 2, 2023
1a0f12a
feat: createUser 추가
na-yk Aug 2, 2023
b3d1b01
feat: BaseEntity 추가
na-yk Aug 2, 2023
d3177e2
feat: Product 엔티티 추가
na-yk Aug 2, 2023
d73f994
feat: createProduct 추가
na-yk Aug 2, 2023
2c54ea7
feat: Order 엔티티 추가
na-yk Aug 3, 2023
cf68dad
feat: OrderProduct 엔티티 추가
na-yk Aug 3, 2023
4a31427
feat: createOrder 추가
na-yk Aug 3, 2023
0b6635d
feat: findOrderById 추가
na-yk Aug 3, 2023
e7c6541
test: Order createTest 추가
na-yk Aug 3, 2023
319ed88
test: Order findByIdTest 추가
na-yk Aug 3, 2023
c8b6813
feat: Product createTest 추가
na-yk Aug 3, 2023
e376283
feat: User createTest 추가
na-yk Aug 3, 2023
db3045d
style: 불필요한 import 제거
na-yk Aug 3, 2023
61e15b1
style: 개행문자 추가
na-yk Aug 3, 2023
f58be7a
feat: lastName에 @Column 스키마 표현
na-yk Aug 4, 2023
f66427a
refactor: name 변경 메서드 하나로 통일
na-yk Aug 4, 2023
8c4801c
style: 메서드 간 공백 추가
na-yk Aug 4, 2023
0f4db15
style: 필요없는 주석 제거
na-yk Aug 4, 2023
2399165
feat: OrderStatus 배송중 상태 추가
na-yk Aug 4, 2023
f657bbb
feat: createUser @Transactional 추가
na-yk Aug 4, 2023
fb55b21
refactor: repository final로 변경
na-yk Aug 4, 2023
7530b79
style: 불필요한 공백 제거
na-yk Aug 4, 2023
8c841bc
refactor: BaseEntity 추상클래스로 변경
na-yk Aug 4, 2023
ef2c8bf
style: single class import로 변경
na-yk Aug 4, 2023
98c1c6f
remove: JpaWeeklyApplicationTests 파일 제거
na-yk Aug 4, 2023
2c065f2
feat: CustomerResponse dto에 id를 포함하도록 수정
na-yk Aug 4, 2023
67b6e00
feat: 기본 생성자 AccessLevel 설정
na-yk Aug 4, 2023
5f08c08
feat: ID 생성 전략 IDENTITY로 변경
na-yk Aug 4, 2023
4dc60f3
feat: @RequiredArgsConstructor 사용
na-yk Aug 4, 2023
979d451
feat: @NoArgsConstructor 사용
na-yk Aug 4, 2023
8128e6e
test: findByIdTest id를 검증하도록 수정
na-yk Aug 4, 2023
75d0380
rename: dto CustomerUpdate -> CustomerUpdateRequest 이름 변경
na-yk Aug 6, 2023
d155497
chore: SpringBoot validation 의존성 추가
na-yk Aug 6, 2023
79d2fe3
refactor: Request dto validation 추가
na-yk Aug 6, 2023
562cd04
style: 불필요한 import 제거
na-yk Aug 6, 2023
8cef3bf
refactor: 부수적인 path 제거
na-yk Aug 6, 2023
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
33 changes: 33 additions & 0 deletions jpa-weekly/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/
Binary file added jpa-weekly/.mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions jpa-weekly/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
316 changes: 316 additions & 0 deletions jpa-weekly/mvnw
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

if [ -f /usr/local/etc/mavenrc ] ; then
. /usr/local/etc/mavenrc
fi

if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi

if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi

fi

# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac

if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi

if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
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

saveddir=`pwd`

M2_HOME=`dirname "$PRG"`/..

# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`

cd "$saveddir"
# echo Using m2 at $M2_HOME
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi

if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi

if [ -z "$JAVACMD" ] ; then
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
else
JAVACMD="`\\unset -f command; \\command -v java`"
fi
fi

if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {

if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi

basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}

# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}

BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi

##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found .mvn/wrapper/maven-wrapper.jar"
fi
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
if [ -n "$MVNW_REPOURL" ]; then
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
else
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
if [ "$MVNW_VERBOSE" = true ]; then
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if $cygwin; then
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi

if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi

else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaClass=`cygpath --path --windows "$javaClass"`
fi
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Compiling MavenWrapperDownloader.java ..."
fi
# Compiling the Java class
("$JAVA_HOME/bin/javac" "$javaClass")
fi
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
# Running the downloader
if [ "$MVNW_VERBOSE" = true ]; then
echo " - Running MavenWrapperDownloader.java ..."
fi
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" \
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Loading