diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..1e684fb Binary files /dev/null and b/.DS_Store differ diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..2c2cf9b --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + { + "associatedIndex": 5 +} + + + + + + + { + "keyToString": { + "ASKED_ADD_EXTERNAL_FILES": "true", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "git-widget-placeholder": "ity0526", + "kotlin-language-version-configured": "true", + "last_opened_file_path": "/Users/intaeyoung/Desktop/UMC-6th-Spring-Study" + } +} + + + + + + + + + + + + + + + + + + + + + 1711764334092 + + + + + + \ No newline at end of file diff --git a/ity0526/.DS_Store b/ity0526/.DS_Store index bff2fe9..7607967 100644 Binary files a/ity0526/.DS_Store and b/ity0526/.DS_Store differ diff --git a/ity0526/.idea/.gitignore b/ity0526/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/ity0526/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/ity0526/.idea/gradle.xml b/ity0526/.idea/gradle.xml new file mode 100644 index 0000000..99640b9 --- /dev/null +++ b/ity0526/.idea/gradle.xml @@ -0,0 +1,28 @@ + + + + + + + \ No newline at end of file diff --git a/ity0526/.idea/ity0526.iml b/ity0526/.idea/ity0526.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/ity0526/.idea/ity0526.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/ity0526/.idea/jarRepositories.xml b/ity0526/.idea/jarRepositories.xml new file mode 100644 index 0000000..fdc392f --- /dev/null +++ b/ity0526/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/ity0526/.idea/misc.xml b/ity0526/.idea/misc.xml new file mode 100644 index 0000000..f8c0954 --- /dev/null +++ b/ity0526/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ity0526/.idea/modules.xml b/ity0526/.idea/modules.xml new file mode 100644 index 0000000..5ec7ea2 --- /dev/null +++ b/ity0526/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ity0526/.idea/vcs.xml b/ity0526/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/ity0526/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ity0526/IntroductionSpring/.gradle/8.7/checksums/checksums.lock b/ity0526/IntroductionSpring/.gradle/8.7/checksums/checksums.lock new file mode 100644 index 0000000..3365756 Binary files /dev/null and b/ity0526/IntroductionSpring/.gradle/8.7/checksums/checksums.lock differ diff --git a/ity0526/IntroductionSpring/.gradle/8.7/dependencies-accessors/gc.properties b/ity0526/IntroductionSpring/.gradle/8.7/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/ity0526/IntroductionSpring/.gradle/8.7/executionHistory/executionHistory.lock b/ity0526/IntroductionSpring/.gradle/8.7/executionHistory/executionHistory.lock new file mode 100644 index 0000000..f82aa32 Binary files /dev/null and b/ity0526/IntroductionSpring/.gradle/8.7/executionHistory/executionHistory.lock differ diff --git a/ity0526/IntroductionSpring/.gradle/8.7/fileChanges/last-build.bin b/ity0526/IntroductionSpring/.gradle/8.7/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/ity0526/IntroductionSpring/.gradle/8.7/fileChanges/last-build.bin differ diff --git a/ity0526/IntroductionSpring/.gradle/8.7/fileHashes/fileHashes.lock b/ity0526/IntroductionSpring/.gradle/8.7/fileHashes/fileHashes.lock new file mode 100644 index 0000000..f009a30 Binary files /dev/null and b/ity0526/IntroductionSpring/.gradle/8.7/fileHashes/fileHashes.lock differ diff --git a/ity0526/IntroductionSpring/.gradle/8.7/gc.properties b/ity0526/IntroductionSpring/.gradle/8.7/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/ity0526/IntroductionSpring/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/ity0526/IntroductionSpring/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..bfc2a7d Binary files /dev/null and b/ity0526/IntroductionSpring/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/ity0526/IntroductionSpring/.gradle/buildOutputCleanup/cache.properties b/ity0526/IntroductionSpring/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..c78573c --- /dev/null +++ b/ity0526/IntroductionSpring/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Tue Apr 09 11:45:25 KST 2024 +gradle.version=8.7 diff --git a/ity0526/IntroductionSpring/.gradle/vcs-1/gc.properties b/ity0526/IntroductionSpring/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/ity0526/hongikhospital/build.gradle b/ity0526/hongikhospital/build.gradle new file mode 100644 index 0000000..105d527 --- /dev/null +++ b/ity0526/hongikhospital/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.2.5' + id 'io.spring.dependency-management' version '1.1.4' +} + +group = 'hongik' +version = '0.0.1-SNAPSHOT' + +java { + sourceCompatibility = '17' +} + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-web' + compileOnly 'org.projectlombok:lombok' + runtimeOnly 'com.h2database:h2' + annotationProcessor 'org.projectlombok:lombok' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + + testImplementation("org.junit.vintage:junit-vintage-engine") { + exclude group: "org.hamcrest", module: "hamcrest-core" + } +} + +tasks.named('test') { + useJUnitPlatform() +} + + diff --git a/ity0526/hongikhospital/gradle/wrapper/gradle-wrapper.jar b/ity0526/hongikhospital/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e644113 Binary files /dev/null and b/ity0526/hongikhospital/gradle/wrapper/gradle-wrapper.jar differ diff --git a/ity0526/hongikhospital/gradle/wrapper/gradle-wrapper.properties b/ity0526/hongikhospital/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b82aa23 --- /dev/null +++ b/ity0526/hongikhospital/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/ity0526/hongikhospital/gradlew b/ity0526/hongikhospital/gradlew new file mode 100755 index 0000000..1aa94a4 --- /dev/null +++ b/ity0526/hongikhospital/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original 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 POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# 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 ;; #( + MSYS* | 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/ity0526/hongikhospital/gradlew.bat b/ity0526/hongikhospital/gradlew.bat new file mode 100644 index 0000000..7101f8e --- /dev/null +++ b/ity0526/hongikhospital/gradlew.bat @@ -0,0 +1,92 @@ +@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=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +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% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ity0526/hongikhospital/settings.gradle b/ity0526/hongikhospital/settings.gradle new file mode 100644 index 0000000..bda5a07 --- /dev/null +++ b/ity0526/hongikhospital/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'hongikhospital' diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/Hello.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/Hello.java new file mode 100644 index 0000000..a347c24 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/Hello.java @@ -0,0 +1,10 @@ +package hongik.hongikhospital; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class Hello { + private String data; +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/HongikhospitalApplication.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/HongikhospitalApplication.java new file mode 100644 index 0000000..5d02110 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/HongikhospitalApplication.java @@ -0,0 +1,19 @@ +package hongik.hongikhospital; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class HongikhospitalApplication { + + public static void main(String[] args) { + + + Hello hello = new Hello(); + hello.setData("hello"); + String data = hello.getData(); + + SpringApplication.run(HongikhospitalApplication.class, args); + } + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Address.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Address.java new file mode 100644 index 0000000..62a43ea --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Address.java @@ -0,0 +1,23 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.Embeddable; +import lombok.Getter; + +@Embeddable +@Getter +public class Address { + + private String city; + private String street; + private String zipcode; + + protected Address() { + + } + + public Address(String city, String street, String zipcode) { + this.city = city; + this.street = street; + this.zipcode = zipcode; + } +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/AllReserve.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/AllReserve.java new file mode 100644 index 0000000..9b421cb --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/AllReserve.java @@ -0,0 +1,31 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Entity +@Getter +@Setter +public class AllReserve { + @Id + @GeneratedValue + @Column(name = "all_id") + private Long id; + + private String doctor; + + private String hospital; + + private String department; + + private String patientName; + + private LocalDateTime time; + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Department.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Department.java new file mode 100644 index 0000000..09d87c5 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Department.java @@ -0,0 +1,27 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +@Entity +@Getter @Setter +public class Department { + @Id + @GeneratedValue + @Column(name = "department_id") + private Long id; + + private String departName; + + @OneToMany(mappedBy = "department") + private List doctors = new ArrayList<>(); + + @ManyToOne + @JoinColumn(name = "hospital_id") + private Hospital hospital; + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Doctor.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Doctor.java new file mode 100644 index 0000000..f8038a5 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Doctor.java @@ -0,0 +1,31 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +@Entity +@Getter +@Setter +public class Doctor { + @Id + @GeneratedValue + @Column(name = "doctor_id") + private Long id; + + private int career; + + private String doctorName; + + private String phoneNumber; + + @OneToMany(mappedBy = "doctor") + private List reserves = new ArrayList<>(); + + @ManyToOne + @JoinColumn(name = "department_id") + private Department department; +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Hospital.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Hospital.java new file mode 100644 index 0000000..2021575 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Hospital.java @@ -0,0 +1,27 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@Entity +@Getter +@Setter +public class Hospital { + @Id + @GeneratedValue + @Column(name = "hospital_id") + private Long id; + + private String hosName; + + @Embedded + private Address address; + + @OneToMany(mappedBy = "hospital") + private List departments = new ArrayList<>(); +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Patient.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Patient.java new file mode 100644 index 0000000..2a6aa1f --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Patient.java @@ -0,0 +1,28 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +@Entity +@Getter +@Setter +public class Patient { + @Id + @GeneratedValue + @Column(name = "patient_id") + private Long id; + + private int age; + + private String gender; + + private String patientName; + + @OneToMany(mappedBy = "patient") + private List reserves = new ArrayList<>(); + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Reserve.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Reserve.java new file mode 100644 index 0000000..a890115 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/domain/Reserve.java @@ -0,0 +1,29 @@ +package hongik.hongikhospital.domain; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Entity +@Getter +@Setter +public class Reserve { + @Id + @GeneratedValue + @Column(name = "reserve_id") + private Long id; + + private String reserveStatus; + + private LocalDateTime reserveTime; + + @ManyToOne + @JoinColumn(name = "patient_id") + private Patient patient; + + @ManyToOne + @JoinColumn(name = "doctor_id") + private Doctor doctor; +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/DepartmentRepository.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/DepartmentRepository.java new file mode 100644 index 0000000..6dc818a --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/DepartmentRepository.java @@ -0,0 +1,32 @@ +package hongik.hongikhospital.repository; + +import hongik.hongikhospital.domain.Department; +import hongik.hongikhospital.domain.Doctor; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public class DepartmentRepository { + @PersistenceContext + private EntityManager em; + + + public Long save(Department department) { + em.persist(department); + return department.getId(); + } + + public List findBydepartname(String name){ + return em.createQuery("select d from Doctor d where d.department = :department",Doctor.class) + .setParameter("department",name) + .getResultList(); + } + + public Department findById(Long id) { + return em.find(Department.class, id); + } + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/DoctorRepository.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/DoctorRepository.java new file mode 100644 index 0000000..e6632eb --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/DoctorRepository.java @@ -0,0 +1,30 @@ +package hongik.hongikhospital.repository; + +import hongik.hongikhospital.domain.Doctor; +import hongik.hongikhospital.domain.Patient; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import org.springframework.stereotype.Repository; + +import javax.print.Doc; +import java.util.List; + +@Repository +public class DoctorRepository { + @PersistenceContext + private EntityManager em; + + public void save(Doctor doctor) { + em.persist(doctor); + } + + public Doctor findOne(Long id) { + return em.find(Doctor.class, id); + } + + public List findByName(String name) { + return em.createQuery("select d from Doctor d where d.doctorname=:name") + .setParameter("name", name) + .getResultList(); + } +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/HospitalRepository.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/HospitalRepository.java new file mode 100644 index 0000000..a2b80ae --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/HospitalRepository.java @@ -0,0 +1,19 @@ +package hongik.hongikhospital.repository; + +import hongik.hongikhospital.domain.Doctor; +import hongik.hongikhospital.domain.Hospital; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; + +public class HospitalRepository { + @PersistenceContext + private EntityManager em; + + public void save(Hospital hospital) { + em.persist(hospital); + } + + public Hospital findOne(Long id) { + return em.find(Hospital.class, id); + } +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/PatientRepository.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/PatientRepository.java new file mode 100644 index 0000000..f5a18ea --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/PatientRepository.java @@ -0,0 +1,31 @@ +package hongik.hongikhospital.repository; + +import hongik.hongikhospital.domain.Patient; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import org.springframework.stereotype.Repository; + +import java.lang.reflect.Member; +import java.util.List; + +@Repository +public class PatientRepository { + + @PersistenceContext + private EntityManager em; + + public void save(Patient patient) { + em.persist(patient); + } + + public Patient findOne(Long id) { + return em.find(Patient.class, id); + } + + public List findByName(String name) { + return em.createQuery("select p from Patient p where p.patientname=:name") + .setParameter("name", name) + .getResultList(); + } +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/ReserveRepository.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/ReserveRepository.java new file mode 100644 index 0000000..ac17cd7 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/repository/ReserveRepository.java @@ -0,0 +1,25 @@ +package hongik.hongikhospital.repository; + +import hongik.hongikhospital.domain.Reserve; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Repository; + +@Repository +@RequiredArgsConstructor +public class ReserveRepository { + private final EntityManager em; + + public void save(Reserve reserve) { + em.persist(reserve); + } + + public Reserve findById(Long id) { + return em.find(Reserve.class, id); + } + + + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/service/PatientService.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/service/PatientService.java new file mode 100644 index 0000000..eac2bc4 --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/service/PatientService.java @@ -0,0 +1,16 @@ +package hongik.hongikhospital.service; + +import hongik.hongikhospital.domain.Patient; +import hongik.hongikhospital.repository.PatientRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +@Transactional(readOnly = true) +public class PatientService { + @Autowired + PatientRepository patientRepository; + + +} diff --git a/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/service/ReserveService.java b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/service/ReserveService.java new file mode 100644 index 0000000..53be9eb --- /dev/null +++ b/ity0526/hongikhospital/src/main/java/hongik/hongikhospital/service/ReserveService.java @@ -0,0 +1,8 @@ +package hongik.hongikhospital.service; + +import org.springframework.stereotype.Service; + +@Service + +public class ReserveService { +} diff --git a/ity0526/hongikhospital/src/main/resources/application.yml b/ity0526/hongikhospital/src/main/resources/application.yml new file mode 100644 index 0000000..87a9a10 --- /dev/null +++ b/ity0526/hongikhospital/src/main/resources/application.yml @@ -0,0 +1,16 @@ +spring: + datasource: + url: jdbc:h2:tcp://localhost/~/hongikhospital + username: sa + password: + driver-class-name: org.h2.Driver + jpa: + hibernate: + ddl-auto: create + properties: + hibernate: +# show_sql: true + format_sql: true +logging: + level: + org.hibernate.SQL: debug \ No newline at end of file diff --git a/ity0526/hongikhospital/src/test/java/hongik/hongikhospital/HongikhospitalApplicationTests.java b/ity0526/hongikhospital/src/test/java/hongik/hongikhospital/HongikhospitalApplicationTests.java new file mode 100644 index 0000000..5d55c25 --- /dev/null +++ b/ity0526/hongikhospital/src/test/java/hongik/hongikhospital/HongikhospitalApplicationTests.java @@ -0,0 +1,13 @@ +package hongik.hongikhospital; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class HongikhospitalApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/Hello.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/Hello.java" new file mode 100644 index 0000000..b132331 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/Hello.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop;public class Hello { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/HelloController.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/HelloController.java" new file mode 100644 index 0000000..92a5ec2 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/HelloController.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop;public class HelloController { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Address.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Address.java" new file mode 100644 index 0000000..3b761c4 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Address.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.domain;public class Address { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Category.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Category.java" new file mode 100644 index 0000000..6281cb1 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Category.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.domain;public class Category { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Delivery.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Delivery.java" new file mode 100644 index 0000000..05e5527 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Delivery.java" @@ -0,0 +1,26 @@ +package jpabook.jpashop.domain; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Getter +@Setter +public class Dlivery { + + @Id + @GeneratedValue + @Column(name = "dlivery_id") + private Long id; + + @OneToOne + private Order order; + + @Embedded + private Address address; + + + @Enumerated(EnumType.STRING) + private DliveryStatus status; +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/DeliveryStatus.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/DeliveryStatus.java" new file mode 100644 index 0000000..a675ecf --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/DeliveryStatus.java" @@ -0,0 +1,5 @@ +package jpabook.jpashop.domain; + +public enum DliveryStatus { + READY, COMP; +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Member.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Member.java" new file mode 100644 index 0000000..3c83c83 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Member.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.domain;public class Member { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Order.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Order.java" new file mode 100644 index 0000000..309831b --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/Order.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.domain;public class Order { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/OrderItem.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/OrderItem.java" new file mode 100644 index 0000000..afa0223 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/OrderItem.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.domain;public class OrderItem { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/OrderStatus.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/OrderStatus.java" new file mode 100644 index 0000000..f563c86 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/OrderStatus.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.domain;public class OrderStatus { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Album.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Album.java" new file mode 100644 index 0000000..294a27a --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Album.java" @@ -0,0 +1,4 @@ +package jpabook.jpashop.domain; + +public class Album { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Book.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Book.java" new file mode 100644 index 0000000..d7f9e51 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Book.java" @@ -0,0 +1,7 @@ +package jpabook.jpashop.domain; + +import jakarta.persistence.Entity; + +@Entity +public class Book { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Item.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Item.java" new file mode 100644 index 0000000..092359e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Item.java" @@ -0,0 +1,25 @@ +package jpabook.jpashop.domain; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Getter +@Setter +public abstract class Item { + + @Id + @GeneratedValue + @Column(name = "item_id") + private Long id; + + private String name; + + private int price; + private int stockQuantity; +} + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Movie.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Movie.java" new file mode 100644 index 0000000..798609e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/domain/item/Movie.java" @@ -0,0 +1,4 @@ +package jpabook.jpashop.domain; + +public class Movie { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/exception/NotEnoughStockException.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/exception/NotEnoughStockException.java" new file mode 100644 index 0000000..6f47ab3 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/exception/NotEnoughStockException.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.exception;public class NotEnoughStockException { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/ItemRepository.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/ItemRepository.java" new file mode 100644 index 0000000..0b3cc5e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/ItemRepository.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.repository;public class ItemRepository { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/MemberRepository.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/MemberRepository.java" new file mode 100644 index 0000000..37e2f43 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/MemberRepository.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.repository;public class MemberRepository { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/OrderRepository.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/OrderRepository.java" new file mode 100644 index 0000000..50f5ce4 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/OrderRepository.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.repository;public class OrderRepository { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/OrderSearch.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/OrderSearch.java" new file mode 100644 index 0000000..c65e623 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/repository/OrderSearch.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.repository;public class OrderSearch { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/ItemService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/ItemService.java" new file mode 100644 index 0000000..3467815 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/ItemService.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.service;public class ItemService { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/MemberService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/MemberService.java" new file mode 100644 index 0000000..0231720 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/MemberService.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.service;public class MemberService { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/OrderService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/OrderService.java" new file mode 100644 index 0000000..09dc2ad --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/java/jpabook/jpashop/service/OrderService.java" @@ -0,0 +1,2 @@ +package jpabook.jpashop.service;public class OrderService { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/application.yml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/application.yml" new file mode 100644 index 0000000..e69de29 diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/static/index.html" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/static/index.html" new file mode 100644 index 0000000..4bdcfcb --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/static/index.html" @@ -0,0 +1,10 @@ + + + + + $Title$ + + +$END$ + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/templates/hello.html" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/templates/hello.html" new file mode 100644 index 0000000..4bdcfcb --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/main/resources/templates/hello.html" @@ -0,0 +1,10 @@ + + + + + $Title$ + + +$END$ + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/MemberRepositoryTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/MemberRepositoryTest.java" new file mode 100644 index 0000000..5fa49aa --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/MemberRepositoryTest.java" @@ -0,0 +1,33 @@ +//package jpabook.jpashop; +// +//import org.assertj.core.api.Assertions; +//import org.junit.Test; +//import org.junit.runner.RunWith; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.boot.test.context.SpringBootTest; +//import org.springframework.test.context.junit4.SpringRunner; +//import org.springframework.transaction.annotation.Transactional; +// +//import static org.junit.Assert.*; +// +//@RunWith(SpringRunner.class) +//@SpringBootTest +//public class MemberRepositoryTest { +// +// @Autowired MemberRepository memberRepository; +// +// @Test +// @Transactional +// public void testMember() throws Exception{ +// //given +// Member member = new Member(); +// member.setUsername("memberA"); +// //when +// Long saveId = memberRepository.save(member); +// Member findMember = memberRepository.find(saveId); +// //then +// Assertions.assertThat(findMember.getId()).isEqualTo(member.getId()); +// Assertions.assertThat(findMember.getUsername()).isEqualTo(member.getUsername()); +// +// } +//} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/service/MemberServiceTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/service/MemberServiceTest.java" new file mode 100644 index 0000000..039cb9b --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/service/MemberServiceTest.java" @@ -0,0 +1,4 @@ +import static org.junit.Assert.*; +public class MemberServiceTest { + +} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/service/OrderServiceTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/service/OrderServiceTest.java" new file mode 100644 index 0000000..3c7b6d7 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \353\266\200\355\212\270\354\231\200 JPA \355\231\234\354\232\2511/src/test/java/jpabook/jpashop/service/OrderServiceTest.java" @@ -0,0 +1,4 @@ +import static org.junit.Assert.*; +public class OrderServiceTest { + +} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.DS_Store" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.DS_Store" new file mode 100644 index 0000000..06b99e0 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.DS_Store" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/checksums/checksums.lock" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/checksums/checksums.lock" new file mode 100644 index 0000000..4704b99 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/checksums/checksums.lock" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/dependencies-accessors/gc.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/dependencies-accessors/gc.properties" new file mode 100644 index 0000000..e69de29 diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/executionHistory/executionHistory.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/executionHistory/executionHistory.bin" new file mode 100644 index 0000000..812fa95 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/executionHistory/executionHistory.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/executionHistory/executionHistory.lock" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/executionHistory/executionHistory.lock" new file mode 100644 index 0000000..7cfd441 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/executionHistory/executionHistory.lock" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileChanges/last-build.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileChanges/last-build.bin" new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileChanges/last-build.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/fileHashes.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/fileHashes.bin" new file mode 100644 index 0000000..ea8e633 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/fileHashes.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/fileHashes.lock" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/fileHashes.lock" new file mode 100644 index 0000000..0de5967 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/fileHashes.lock" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/resourceHashesCache.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/resourceHashesCache.bin" new file mode 100644 index 0000000..791131b Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/fileHashes/resourceHashesCache.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/gc.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/8.7/gc.properties" new file mode 100644 index 0000000..e69de29 diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/buildOutputCleanup.lock" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/buildOutputCleanup.lock" new file mode 100644 index 0000000..2099980 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/buildOutputCleanup.lock" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/cache.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/cache.properties" new file mode 100644 index 0000000..5d16482 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/cache.properties" @@ -0,0 +1,2 @@ +#Sat Apr 06 11:12:37 KST 2024 +gradle.version=8.7 diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/outputFiles.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/outputFiles.bin" new file mode 100644 index 0000000..72c14b5 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/buildOutputCleanup/outputFiles.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/file-system.probe" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/file-system.probe" new file mode 100644 index 0000000..ef43b58 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/file-system.probe" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/vcs-1/gc.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.gradle/vcs-1/gc.properties" new file mode 100644 index 0000000..e69de29 diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/.gitignore" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/.gitignore" new file mode 100644 index 0000000..26d3352 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/.gitignore" @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/.name" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/.name" new file mode 100644 index 0000000..0f31176 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/.name" @@ -0,0 +1 @@ +core \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/compiler.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/compiler.xml" new file mode 100644 index 0000000..b589d56 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/compiler.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/gradle.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/gradle.xml" new file mode 100644 index 0000000..446c193 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/gradle.xml" @@ -0,0 +1,18 @@ + + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/jarRepositories.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/jarRepositories.xml" new file mode 100644 index 0000000..fdc392f --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/jarRepositories.xml" @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/misc.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/misc.xml" new file mode 100644 index 0000000..9d5d112 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/misc.xml" @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/uiDesigner.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/uiDesigner.xml" new file mode 100644 index 0000000..2b63946 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/uiDesigner.xml" @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/vcs.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/vcs.xml" new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/.idea/vcs.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/HELP.md" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/HELP.md" new file mode 100644 index 0000000..77eddac --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/HELP.md" @@ -0,0 +1,14 @@ +# Getting Started + +### Reference Documentation +For further reference, please consider the following sections: + +* [Official Gradle documentation](https://docs.gradle.org) +* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.2.4/gradle-plugin/reference/html/) +* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.4/gradle-plugin/reference/html/#build-image) + +### Additional Links +These additional references should also help you: + +* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle) + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/README.md" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/README.md" new file mode 100644 index 0000000..4e6837f --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/README.md" @@ -0,0 +1,89 @@ +# 섹션 1 객체지향 설계와 스프링 + +----- + +## 스프링이란? +**객체 지향**의 강력한 특징을 살려낸 자바 언어 기반의 프레임 워크 + +## 좋은 객체 지향 프로그래밍 +유연하고 변경이 용이한 코드를 작성 = 역할과 구현을 분리 + +>- 역할 - 인터페이스 +>- 구현 - 인터페이스를 구현한 클래스, 구현 객체 + +클라이언트가 구현부보다 인터페이스에 집중하는 것이 중요 + +## 자바 언어의 다형성 +오버라이딩 기능을 활용하여 객체를 실행시점에 유연하게 변경가능 + +MemberService class 에서 Repository를 호출 할 때 +~~~java + private MemberRepository m = new MemorymemberRepository(); + private MemberRepository m = new JdbcmemberRepository(); +~~~ +인터페이스 MemberRepository는 그대로 유지 + +상속관계의 인터페이스 구현체 Memory, Jdbc 중 하나 선택하여 유연하게 변경 + +## 종은 객체 지향설계의 5가지 원칙(**SOLID**) ++ **SRP - 단일 책임 원칙** + + 한 클래스가 하나의 책임만 가져 변경이 있을 때 파급 효과가 적게 해야한다. + + ++ **OCP - 개방 폐쇄 원칙** + + 확장에는 열려 있으나 변경에는 닫혀있어야한다. + + 인터페이스 유지 : 변경에 닫힘 + + 클래스 구현 : 확장에 열림 + +~~~java +public class MemberService { +//private MemberRepository m = new MemorymemberRepository; + private MemberRepository m = new JdbcmemberRepository(); +} +~~~ +위와 같이 인터페이스 변경 없이 클래스만 Memory -> Jdbc 변경 + ++ **LSP - 리스코프 치환 원칙** + + 인터페이스의 규약은 무조건 지켜야한다. 즉, 하위 인스턴스의 변경이 있어도 인터페이스의 기능은 유지해야한다. + + ++ **ISP - 인터페이스 분리 원칙** + + 특정 클라이언트를 위한 여러개의 인터페이스가 단일 인터페이스보다 좋다. + + ex) 자동차 인터페이스(운전자, 정비사) -> 운전자 인터페이스, 정비사 인터페이스 + + ++ **DIP - 의존관계 역전의 원칙** + + 구현 클래스가 아닌 인터페이스에 의존해야 한다. + +위 코드를 보면 MemberService는 구현 클래스에 의존하고 있으며 그에 따라 코드 변경이 일어나고 있다. + +#### OCP, DIP 원칙 위반! + +다형성으로는 SOLID를 전부 만족 시킬 수 없다. + +따라서 스프링을 통해 클라이언트 코드 변경 없이 기능을 확장시킨다(DI 활용). + + +# 섹션2 스프링 핵심 원리 이해1 - 예제 만들기 + +----- + +먼저 두 가지 요구사항을 알아보자 +> + 회원 +> + 회원가입, 조회 +> + 일반, VIP의 두 가지 등급 +> + 회원 데이터의 DB아직 확정 안됨 +>+ 주문, 할인 정책 +> + 상품 주문 +> + 등급에 따라 할인 적용 +> + VIP는 1000원 고정 금액 할인 +> + 할인 정책은 변동 가능 + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build.gradle" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build.gradle" new file mode 100644 index 0000000..075aba9 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build.gradle" @@ -0,0 +1,25 @@ +plugins { + id 'java' + id 'org.springframework.boot' version '3.2.4' + id 'io.spring.dependency-management' version '1.1.4' +} + +group = 'hello' +version = '0.0.1-SNAPSHOT' + +java { + sourceCompatibility = '17' +} + +repositories { + mavenCentral() +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter' + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} + +tasks.named('test') { + useJUnitPlatform() +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AppConfig$1.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AppConfig$1.class" new file mode 100644 index 0000000..45885a4 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AppConfig$1.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AppConfig.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AppConfig.class" new file mode 100644 index 0000000..c1a0e4b Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AppConfig.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AutoAppConfig.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AutoAppConfig.class" new file mode 100644 index 0000000..cd1d112 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/AutoAppConfig.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/CoreApplication.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/CoreApplication.class" new file mode 100644 index 0000000..778a738 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/CoreApplication.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/MemberApp.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/MemberApp.class" new file mode 100644 index 0000000..8f12598 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/MemberApp.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/OrderApp.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/OrderApp.class" new file mode 100644 index 0000000..4f7d157 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/OrderApp.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/DiscountPolicy.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/DiscountPolicy.class" new file mode 100644 index 0000000..645852b Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/DiscountPolicy.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/FixDiscountPolicy.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/FixDiscountPolicy.class" new file mode 100644 index 0000000..a473b7d Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/FixDiscountPolicy.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/RateDiscountPolicy.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/RateDiscountPolicy.class" new file mode 100644 index 0000000..6acc2cb Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/discount/RateDiscountPolicy.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/Grade.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/Grade.class" new file mode 100644 index 0000000..e290eb6 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/Grade.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/Member.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/Member.class" new file mode 100644 index 0000000..38e5350 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/Member.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberRepository.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberRepository.class" new file mode 100644 index 0000000..a217d87 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberRepository.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberService.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberService.class" new file mode 100644 index 0000000..95a884b Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberService.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberServiceImpl.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberServiceImpl.class" new file mode 100644 index 0000000..0401f94 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemberServiceImpl.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemoryMemberRepository.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemoryMemberRepository.class" new file mode 100644 index 0000000..1b126ac Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/member/MemoryMemberRepository.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/Order.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/Order.class" new file mode 100644 index 0000000..95757b5 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/Order.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/OrderService.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/OrderService.class" new file mode 100644 index 0000000..7c79b59 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/OrderService.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/OrderServiceImpl.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/OrderServiceImpl.class" new file mode 100644 index 0000000..ac14bbb Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/main/hello/core/order/OrderServiceImpl.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/CoreApplicationTests.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/CoreApplicationTests.class" new file mode 100644 index 0000000..315c3ed Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/CoreApplicationTests.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beandefinition/BeanDefinitionTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beandefinition/BeanDefinitionTest.class" new file mode 100644 index 0000000..0fcc798 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beandefinition/BeanDefinitionTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextBasicFindTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextBasicFindTest.class" new file mode 100644 index 0000000..35e2177 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextBasicFindTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextExtendsFindTest$TestConfig.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextExtendsFindTest$TestConfig.class" new file mode 100644 index 0000000..7e45083 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextExtendsFindTest$TestConfig.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextExtendsFindTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextExtendsFindTest.class" new file mode 100644 index 0000000..25f5c86 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextExtendsFindTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextInfoTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextInfoTest.class" new file mode 100644 index 0000000..3714115 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextInfoTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextSameBeanFindTest$SameBeanConfig.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextSameBeanFindTest$SameBeanConfig.class" new file mode 100644 index 0000000..a76112c Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextSameBeanFindTest$SameBeanConfig.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextSameBeanFindTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextSameBeanFindTest.class" new file mode 100644 index 0000000..14bf1a3 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/beanfind/ApplicationContextSameBeanFindTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/discount/RateDiscountPolicyTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/discount/RateDiscountPolicyTest.class" new file mode 100644 index 0000000..7a29e63 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/discount/RateDiscountPolicyTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/member/MemberServiceTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/member/MemberServiceTest.class" new file mode 100644 index 0000000..c462540 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/member/MemberServiceTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/order/OrderServiceTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/order/OrderServiceTest.class" new file mode 100644 index 0000000..46b08f3 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/order/OrderServiceTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/AutoAppConfigTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/AutoAppConfigTest.class" new file mode 100644 index 0000000..f40e187 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/AutoAppConfigTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/BeanA.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/BeanA.class" new file mode 100644 index 0000000..cd9daa1 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/BeanA.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/BeanB.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/BeanB.class" new file mode 100644 index 0000000..36b3907 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/BeanB.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/ComponentFilterAppConfigTest$ComponentFilterAppConfig.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/ComponentFilterAppConfigTest$ComponentFilterAppConfig.class" new file mode 100644 index 0000000..5c09e24 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/ComponentFilterAppConfigTest$ComponentFilterAppConfig.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/ComponentFilterAppConfigTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/ComponentFilterAppConfigTest.class" new file mode 100644 index 0000000..04848ec Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/ComponentFilterAppConfigTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/MyExcludeComponent.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/MyExcludeComponent.class" new file mode 100644 index 0000000..8db8780 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/MyExcludeComponent.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/MyIncludeComponent.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/MyIncludeComponent.class" new file mode 100644 index 0000000..f309b0c Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/scan/filter/MyIncludeComponent.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/ConfigurationSingletonTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/ConfigurationSingletonTest.class" new file mode 100644 index 0000000..b17e57d Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/ConfigurationSingletonTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/SingletonService.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/SingletonService.class" new file mode 100644 index 0000000..6e85ae5 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/SingletonService.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/SingletonTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/SingletonTest.class" new file mode 100644 index 0000000..7358c69 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/SingletonTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulService.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulService.class" new file mode 100644 index 0000000..c63d918 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulService.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulServiceTest$TestConfig.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulServiceTest$TestConfig.class" new file mode 100644 index 0000000..c62931c Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulServiceTest$TestConfig.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulServiceTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulServiceTest.class" new file mode 100644 index 0000000..a0969f7 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/singleton/StatefulServiceTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/xmp/XmlAppContext.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/xmp/XmlAppContext.class" new file mode 100644 index 0000000..60aa76d Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/classes/java/test/hello/core/xmp/XmlAppContext.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/classes/hello.core.scan.filter.ComponentFilterAppConfigTest.html" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/classes/hello.core.scan.filter.ComponentFilterAppConfigTest.html" new file mode 100644 index 0000000..700319f --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/classes/hello.core.scan.filter.ComponentFilterAppConfigTest.html" @@ -0,0 +1,123 @@ + + + + + +Test results - ComponentFilterAppConfigTest + + + + + +
+

ComponentFilterAppConfigTest

+ +
+ + + + + +
+
+ + + + + + + +
+
+
1
+

tests

+
+
+
+
0
+

failures

+
+
+
+
0
+

ignored

+
+
+
+
0.195s
+

duration

+
+
+
+
+
+
100%
+

successful

+
+
+
+
+ +
+

Tests

+ + + + + + + + + + + + + +
TestDurationResult
filterScan()0.195spassed
+
+
+

Standard output

+ +
17:20:03.207 [Test worker] DEBUG o.s.c.a.AnnotationConfigApplicationContext --
+                Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2cc44ad
+17:20:03.212 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
+17:20:03.232 [Test worker] DEBUG o.s.c.a.ClassPathBeanDefinitionScanner --
+                Identified candidate component class: file [/Users/intaeyoung/Desktop/UMC-6th-Spring-Study/ity0526/스프링 핵심 원리 - 기본편/build/classes/java/test/hello/core/scan/filter/BeanA.class]
+17:20:03.261 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor'
+17:20:03.262 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
+17:20:03.263 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
+17:20:03.263 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
+17:20:03.266 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'componentFilterAppConfigTest.ComponentFilterAppConfig'
+17:20:03.268 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory --
+                Creating shared instance of singleton bean 'beanA'
+
+
+
+
+ +
+ + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/css/base-style.css" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/css/base-style.css" new file mode 100644 index 0000000..4afa73e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/css/base-style.css" @@ -0,0 +1,179 @@ + +body { + margin: 0; + padding: 0; + font-family: sans-serif; + font-size: 12pt; +} + +body, a, a:visited { + color: #303030; +} + +#content { + padding-left: 50px; + padding-right: 50px; + padding-top: 30px; + padding-bottom: 30px; +} + +#content h1 { + font-size: 160%; + margin-bottom: 10px; +} + +#footer { + margin-top: 100px; + font-size: 80%; + white-space: nowrap; +} + +#footer, #footer a { + color: #a0a0a0; +} + +#line-wrapping-toggle { + vertical-align: middle; +} + +#label-for-line-wrapping-toggle { + vertical-align: middle; +} + +ul { + margin-left: 0; +} + +h1, h2, h3 { + white-space: nowrap; +} + +h2 { + font-size: 120%; +} + +ul.tabLinks { + padding-left: 0; + padding-top: 10px; + padding-bottom: 10px; + overflow: auto; + min-width: 800px; + width: auto !important; + width: 800px; +} + +ul.tabLinks li { + float: left; + height: 100%; + list-style: none; + padding-left: 10px; + padding-right: 10px; + padding-top: 5px; + padding-bottom: 5px; + margin-bottom: 0; + -moz-border-radius: 7px; + border-radius: 7px; + margin-right: 25px; + border: solid 1px #d4d4d4; + background-color: #f0f0f0; +} + +ul.tabLinks li:hover { + background-color: #fafafa; +} + +ul.tabLinks li.selected { + background-color: #c5f0f5; + border-color: #c5f0f5; +} + +ul.tabLinks a { + font-size: 120%; + display: block; + outline: none; + text-decoration: none; + margin: 0; + padding: 0; +} + +ul.tabLinks li h2 { + margin: 0; + padding: 0; +} + +div.tab { +} + +div.selected { + display: block; +} + +div.deselected { + display: none; +} + +div.tab table { + min-width: 350px; + width: auto !important; + width: 350px; + border-collapse: collapse; +} + +div.tab th, div.tab table { + border-bottom: solid #d0d0d0 1px; +} + +div.tab th { + text-align: left; + white-space: nowrap; + padding-left: 6em; +} + +div.tab th:first-child { + padding-left: 0; +} + +div.tab td { + white-space: nowrap; + padding-left: 6em; + padding-top: 5px; + padding-bottom: 5px; +} + +div.tab td:first-child { + padding-left: 0; +} + +div.tab td.numeric, div.tab th.numeric { + text-align: right; +} + +span.code { + display: inline-block; + margin-top: 0em; + margin-bottom: 1em; +} + +span.code pre { + font-size: 11pt; + padding-top: 10px; + padding-bottom: 10px; + padding-left: 10px; + padding-right: 10px; + margin: 0; + background-color: #f7f7f7; + border: solid 1px #d0d0d0; + min-width: 700px; + width: auto !important; + width: 700px; +} + +span.wrapped pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: break-all; +} + +label.hidden { + display: none; +} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/css/style.css" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/css/style.css" new file mode 100644 index 0000000..3dc4913 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/css/style.css" @@ -0,0 +1,84 @@ + +#summary { + margin-top: 30px; + margin-bottom: 40px; +} + +#summary table { + border-collapse: collapse; +} + +#summary td { + vertical-align: top; +} + +.breadcrumbs, .breadcrumbs a { + color: #606060; +} + +.infoBox { + width: 110px; + padding-top: 15px; + padding-bottom: 15px; + text-align: center; +} + +.infoBox p { + margin: 0; +} + +.counter, .percent { + font-size: 120%; + font-weight: bold; + margin-bottom: 8px; +} + +#duration { + width: 125px; +} + +#successRate, .summaryGroup { + border: solid 2px #d0d0d0; + -moz-border-radius: 10px; + border-radius: 10px; +} + +#successRate { + width: 140px; + margin-left: 35px; +} + +#successRate .percent { + font-size: 180%; +} + +.success, .success a { + color: #008000; +} + +div.success, #successRate.success { + background-color: #bbd9bb; + border-color: #008000; +} + +.failures, .failures a { + color: #b60808; +} + +.skipped, .skipped a { + color: #c09853; +} + +div.failures, #successRate.failures { + background-color: #ecdada; + border-color: #b60808; +} + +ul.linkList { + padding-left: 0; +} + +ul.linkList li { + list-style: none; + margin-bottom: 5px; +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/index.html" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/index.html" new file mode 100644 index 0000000..324b040 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/index.html" @@ -0,0 +1,133 @@ + + + + + +Test results - Test Summary + + + + + +
+

Test Summary

+
+ + + + + +
+
+ + + + + + + +
+
+
1
+

tests

+
+
+
+
0
+

failures

+
+
+
+
0
+

ignored

+
+
+
+
0.195s
+

duration

+
+
+
+
+
+
100%
+

successful

+
+
+
+
+ +
+

Packages

+ + + + + + + + + + + + + + + + + + + + + +
PackageTestsFailuresIgnoredDurationSuccess rate
+hello.core.scan.filter +1000.195s100%
+
+
+

Classes

+ + + + + + + + + + + + + + + + + + + + + +
ClassTestsFailuresIgnoredDurationSuccess rate
+hello.core.scan.filter.ComponentFilterAppConfigTest +1000.195s100%
+
+
+ +
+ + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/js/report.js" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/js/report.js" new file mode 100644 index 0000000..83bab4a --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/js/report.js" @@ -0,0 +1,194 @@ +(function (window, document) { + "use strict"; + + var tabs = {}; + + function changeElementClass(element, classValue) { + if (element.getAttribute("className")) { + element.setAttribute("className", classValue); + } else { + element.setAttribute("class", classValue); + } + } + + function getClassAttribute(element) { + if (element.getAttribute("className")) { + return element.getAttribute("className"); + } else { + return element.getAttribute("class"); + } + } + + function addClass(element, classValue) { + changeElementClass(element, getClassAttribute(element) + " " + classValue); + } + + function removeClass(element, classValue) { + changeElementClass(element, getClassAttribute(element).replace(classValue, "")); + } + + function initTabs() { + var container = document.getElementById("tabs"); + + tabs.tabs = findTabs(container); + tabs.titles = findTitles(tabs.tabs); + tabs.headers = findHeaders(container); + tabs.select = select; + tabs.deselectAll = deselectAll; + tabs.select(0); + + return true; + } + + function getCheckBox() { + return document.getElementById("line-wrapping-toggle"); + } + + function getLabelForCheckBox() { + return document.getElementById("label-for-line-wrapping-toggle"); + } + + function findCodeBlocks() { + var spans = document.getElementById("tabs").getElementsByTagName("span"); + var codeBlocks = []; + for (var i = 0; i < spans.length; ++i) { + if (spans[i].className.indexOf("code") >= 0) { + codeBlocks.push(spans[i]); + } + } + return codeBlocks; + } + + function forAllCodeBlocks(operation) { + var codeBlocks = findCodeBlocks(); + + for (var i = 0; i < codeBlocks.length; ++i) { + operation(codeBlocks[i], "wrapped"); + } + } + + function toggleLineWrapping() { + var checkBox = getCheckBox(); + + if (checkBox.checked) { + forAllCodeBlocks(addClass); + } else { + forAllCodeBlocks(removeClass); + } + } + + function initControls() { + if (findCodeBlocks().length > 0) { + var checkBox = getCheckBox(); + var label = getLabelForCheckBox(); + + checkBox.onclick = toggleLineWrapping; + checkBox.checked = false; + + removeClass(label, "hidden"); + } + } + + function switchTab() { + var id = this.id.substr(1); + + for (var i = 0; i < tabs.tabs.length; i++) { + if (tabs.tabs[i].id === id) { + tabs.select(i); + break; + } + } + + return false; + } + + function select(i) { + this.deselectAll(); + + changeElementClass(this.tabs[i], "tab selected"); + changeElementClass(this.headers[i], "selected"); + + while (this.headers[i].firstChild) { + this.headers[i].removeChild(this.headers[i].firstChild); + } + + var h2 = document.createElement("H2"); + + h2.appendChild(document.createTextNode(this.titles[i])); + this.headers[i].appendChild(h2); + } + + function deselectAll() { + for (var i = 0; i < this.tabs.length; i++) { + changeElementClass(this.tabs[i], "tab deselected"); + changeElementClass(this.headers[i], "deselected"); + + while (this.headers[i].firstChild) { + this.headers[i].removeChild(this.headers[i].firstChild); + } + + var a = document.createElement("A"); + + a.setAttribute("id", "ltab" + i); + a.setAttribute("href", "#tab" + i); + a.onclick = switchTab; + a.appendChild(document.createTextNode(this.titles[i])); + + this.headers[i].appendChild(a); + } + } + + function findTabs(container) { + return findChildElements(container, "DIV", "tab"); + } + + function findHeaders(container) { + var owner = findChildElements(container, "UL", "tabLinks"); + return findChildElements(owner[0], "LI", null); + } + + function findTitles(tabs) { + var titles = []; + + for (var i = 0; i < tabs.length; i++) { + var tab = tabs[i]; + var header = findChildElements(tab, "H2", null)[0]; + + header.parentNode.removeChild(header); + + if (header.innerText) { + titles.push(header.innerText); + } else { + titles.push(header.textContent); + } + } + + return titles; + } + + function findChildElements(container, name, targetClass) { + var elements = []; + var children = container.childNodes; + + for (var i = 0; i < children.length; i++) { + var child = children.item(i); + + if (child.nodeType === 1 && child.nodeName === name) { + if (targetClass && child.className.indexOf(targetClass) < 0) { + continue; + } + + elements.push(child); + } + } + + return elements; + } + + // Entry point. + + window.onload = function() { + initTabs(); + initControls(); + }; +} (window, window.document)); \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/packages/hello.core.scan.filter.html" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/packages/hello.core.scan.filter.html" new file mode 100644 index 0000000..f903e59 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/reports/tests/test/packages/hello.core.scan.filter.html" @@ -0,0 +1,103 @@ + + + + + +Test results - Package hello.core.scan.filter + + + + + +
+

Package hello.core.scan.filter

+ +
+ + + + + +
+
+ + + + + + + +
+
+
1
+

tests

+
+
+
+
0
+

failures

+
+
+
+
0
+

ignored

+
+
+
+
0.195s
+

duration

+
+
+
+
+
+
100%
+

successful

+
+
+
+
+ +
+

Classes

+ + + + + + + + + + + + + + + + + + + +
ClassTestsFailuresIgnoredDurationSuccess rate
+ComponentFilterAppConfigTest +1000.195s100%
+
+
+ +
+ + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/appConfig.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/appConfig.xml" new file mode 100644 index 0000000..76eefc9 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/appConfig.xml" @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/application.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/application.properties" new file mode 100644 index 0000000..061bbe4 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/application.properties" @@ -0,0 +1 @@ +spring.application.name=core diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/logback.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/logback.xml" new file mode 100644 index 0000000..497de1c --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/resources/main/logback.xml" @@ -0,0 +1,11 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%kvp- + %msg%n + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/TEST-hello.core.scan.filter.ComponentFilterAppConfigTest.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/TEST-hello.core.scan.filter.ComponentFilterAppConfigTest.xml" new file mode 100644 index 0000000..79c9946 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/TEST-hello.core.scan.filter.ComponentFilterAppConfigTest.xml" @@ -0,0 +1,25 @@ + + + + + + + diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/output.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/output.bin" new file mode 100644 index 0000000..2222b4e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/output.bin" @@ -0,0 +1,18 @@ +O17:20:03.207 [Test worker] DEBUG o.s.c.a.AnnotationConfigApplicationContext -- +m Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2cc44ad +I17:20:03.212 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- + Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +K17:20:03.232 [Test worker] DEBUG o.s.c.a.ClassPathBeanDefinitionScanner -- + Identified candidate component class: file [/Users/intaeyoung/Desktop/UMC-6th-Spring-Study/ity0526/스프링 핵심 원리 - 기본편/build/classes/java/test/hello/core/scan/filter/BeanA.class] +I17:20:03.261 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- +~ Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor' +I17:20:03.262 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- +| Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory' +I17:20:03.263 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- + Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +I17:20:03.263 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- + Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' +I17:20:03.266 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- +s Creating shared instance of singleton bean 'componentFilterAppConfigTest.ComponentFilterAppConfig' +I17:20:03.268 [Test worker] DEBUG o.s.b.f.s.DefaultListableBeanFactory -- +C Creating shared instance of singleton bean 'beanA' diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/output.bin.idx" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/output.bin.idx" new file mode 100644 index 0000000..63037dd Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/output.bin.idx" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/results.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/results.bin" new file mode 100644 index 0000000..7bc4f36 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/test-results/test/binary/results.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/AppConfig$1.class.uniqueId3" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/AppConfig$1.class.uniqueId3" new file mode 100644 index 0000000..45885a4 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/AppConfig$1.class.uniqueId3" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/AppConfig.class.uniqueId4" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/AppConfig.class.uniqueId4" new file mode 100644 index 0000000..c1a0e4b Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/AppConfig.class.uniqueId4" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/MemberServiceImpl.class.uniqueId5" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/MemberServiceImpl.class.uniqueId5" new file mode 100644 index 0000000..4eac4cd Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/MemberServiceImpl.class.uniqueId5" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/MemoryMemberRepository.class.uniqueId0" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/MemoryMemberRepository.class.uniqueId0" new file mode 100644 index 0000000..8ce84b4 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/MemoryMemberRepository.class.uniqueId0" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/OrderServiceImpl.class.uniqueId2" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/OrderServiceImpl.class.uniqueId2" new file mode 100644 index 0000000..9d2ac20 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/OrderServiceImpl.class.uniqueId2" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/RateDiscountPolicy.class.uniqueId1" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/RateDiscountPolicy.class.uniqueId1" new file mode 100644 index 0000000..1382263 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/compileTransaction/stash-dir/RateDiscountPolicy.class.uniqueId1" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/previous-compilation-data.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/previous-compilation-data.bin" new file mode 100644 index 0000000..2a1bf90 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileJava/previous-compilation-data.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/compileTransaction/stash-dir/ComponentFilterAppConfigTest$ComponentFilterAppConfig.class.uniqueId0" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/compileTransaction/stash-dir/ComponentFilterAppConfigTest$ComponentFilterAppConfig.class.uniqueId0" new file mode 100644 index 0000000..387a53e Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/compileTransaction/stash-dir/ComponentFilterAppConfigTest$ComponentFilterAppConfig.class.uniqueId0" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/compileTransaction/stash-dir/ComponentFilterAppConfigTest.class.uniqueId1" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/compileTransaction/stash-dir/ComponentFilterAppConfigTest.class.uniqueId1" new file mode 100644 index 0000000..567556d Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/compileTransaction/stash-dir/ComponentFilterAppConfigTest.class.uniqueId1" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/previous-compilation-data.bin" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/previous-compilation-data.bin" new file mode 100644 index 0000000..ae48d38 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/build/tmp/compileTestJava/previous-compilation-data.bin" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradle/wrapper/gradle-wrapper.jar" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradle/wrapper/gradle-wrapper.jar" new file mode 100644 index 0000000..e644113 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradle/wrapper/gradle-wrapper.jar" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradle/wrapper/gradle-wrapper.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradle/wrapper/gradle-wrapper.properties" new file mode 100644 index 0000000..b82aa23 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradle/wrapper/gradle-wrapper.properties" @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradlew" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradlew" new file mode 100755 index 0000000..1aa94a4 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradlew" @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original 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 POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# 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 ;; #( + MSYS* | 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradlew.bat" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradlew.bat" new file mode 100644 index 0000000..7101f8e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/gradlew.bat" @@ -0,0 +1,92 @@ +@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=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +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% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/CoreApplication.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/CoreApplication.class" new file mode 100644 index 0000000..d1f15a9 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/CoreApplication.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/MemberApp.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/MemberApp.class" new file mode 100644 index 0000000..05ca8cd Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/MemberApp.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/OrderApp.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/OrderApp.class" new file mode 100644 index 0000000..9f06bee Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/OrderApp.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/DiscountPolicy.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/DiscountPolicy.class" new file mode 100644 index 0000000..00d88d4 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/DiscountPolicy.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/FixDiscountPolicy.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/FixDiscountPolicy.class" new file mode 100644 index 0000000..a6ed784 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/FixDiscountPolicy.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/RateDiscountPolicy.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/RateDiscountPolicy.class" new file mode 100644 index 0000000..c0dd064 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/discount/RateDiscountPolicy.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/Grade.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/Grade.class" new file mode 100644 index 0000000..3ccde66 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/Grade.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/Member.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/Member.class" new file mode 100644 index 0000000..a201149 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/Member.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberRepository.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberRepository.class" new file mode 100644 index 0000000..d1d40c2 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberRepository.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberService.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberService.class" new file mode 100644 index 0000000..b24e49c Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberService.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberServiceImpl.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberServiceImpl.class" new file mode 100644 index 0000000..43619f5 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemberServiceImpl.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemoryMemberRepository.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemoryMemberRepository.class" new file mode 100644 index 0000000..e86eb51 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/member/MemoryMemberRepository.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/Order.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/Order.class" new file mode 100644 index 0000000..989596d Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/Order.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/OrderService.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/OrderService.class" new file mode 100644 index 0000000..a44eef6 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/OrderService.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/OrderServiceImpl.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/OrderServiceImpl.class" new file mode 100644 index 0000000..727f0ee Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/classes/hello/core/order/OrderServiceImpl.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/resources/application.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/resources/application.properties" new file mode 100644 index 0000000..061bbe4 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/production/resources/application.properties" @@ -0,0 +1 @@ +spring.application.name=core diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/CoreApplicationTests.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/CoreApplicationTests.class" new file mode 100644 index 0000000..315c3ed Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/CoreApplicationTests.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/discount/RateDiscountPolicyTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/discount/RateDiscountPolicyTest.class" new file mode 100644 index 0000000..7fb32c9 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/discount/RateDiscountPolicyTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/member/MemberServiceTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/member/MemberServiceTest.class" new file mode 100644 index 0000000..9b7c57f Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/member/MemberServiceTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/order/OrderServiceTest.class" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/order/OrderServiceTest.class" new file mode 100644 index 0000000..4b89571 Binary files /dev/null and "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/out/test/classes/hello/core/order/OrderServiceTest.class" differ diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/settings.gradle" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/settings.gradle" new file mode 100644 index 0000000..4d52ac5 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/settings.gradle" @@ -0,0 +1 @@ +rootProject.name = 'core' diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/AppConfig.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/AppConfig.java" new file mode 100644 index 0000000..b7e1ae3 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/AppConfig.java" @@ -0,0 +1,44 @@ +package hello.core; + +import hello.core.discount.DiscountPolicy; +import hello.core.discount.FixDiscountPolicy; +import hello.core.discount.RateDiscountPolicy; +import hello.core.member.MemberRepository; +import hello.core.member.MemberService; +import hello.core.member.MemberServiceImpl; +import hello.core.member.MemoryMemberRepository; +import hello.core.order.OrderService; +import hello.core.order.OrderServiceImpl; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class AppConfig { + + @Bean + public MemberService memberService() { + + System.out.println("call AppConfig.memberService"); + return new MemberServiceImpl(memberRepository()); + } + + @Bean + public MemberRepository memberRepository() { + System.out.println("call AppConfig.memberRepository"); + return new MemoryMemberRepository() { + }; + } + + @Bean + public OrderService orderService() { + System.out.println("call AppConfig.orderService"); + return new OrderServiceImpl(memberRepository(), disCountPolicy()); + } + + @Bean + public DiscountPolicy disCountPolicy() { + return new RateDiscountPolicy(); + } + + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/AutoAppConfig.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/AutoAppConfig.java" new file mode 100644 index 0000000..fc51c42 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/AutoAppConfig.java" @@ -0,0 +1,13 @@ +package hello.core; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; + +@Configuration +@ComponentScan( + excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Configuration.class) +) +public class AutoAppConfig { + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/CoreApplication.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/CoreApplication.java" new file mode 100644 index 0000000..5bc183f --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/CoreApplication.java" @@ -0,0 +1,13 @@ +package hello.core; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class CoreApplication { + + public static void main(String[] args) { + SpringApplication.run(CoreApplication.class, args); + } + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/MemberApp.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/MemberApp.java" new file mode 100644 index 0000000..1121d50 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/MemberApp.java" @@ -0,0 +1,23 @@ +package hello.core; + +import hello.core.member.Grade; +import hello.core.member.Member; +import hello.core.member.MemberService; +import hello.core.member.MemberServiceImpl; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +public class MemberApp { + public static void main(String[] arg) { +// AppConfig appConfig = new AppConfig(); +// MemberService memberService = appConfig.memberService(); + ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class); + MemberService memberService = applicationContext.getBean("memberService", MemberService.class); + Member member = new Member(1L, "memberA", Grade.VIP); + memberService.join(member); + + Member findMember = memberService.findMember(1L); + System.out.println("member = " + member.getName()); + System.out.println("'findMember' = " + findMember.getName()); + } +} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/OrderApp.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/OrderApp.java" new file mode 100644 index 0000000..7a75fbe --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/OrderApp.java" @@ -0,0 +1,33 @@ +package hello.core; + +import hello.core.member.Grade; +import hello.core.member.Member; +import hello.core.member.MemberService; +import hello.core.member.MemberServiceImpl; +import hello.core.order.Order; +import hello.core.order.OrderService; +import hello.core.order.OrderServiceImpl; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +public class OrderApp { + + public static void main(String[] args) { + +// AppConfig appConfig = new AppConfig(); +// MemberService memberService = appConfig.memberService(); +// OrderService orderService = appConfig.orderService(); + ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class); + MemberService memberService = applicationContext.getBean("memberService", MemberService.class); + OrderService orderService = applicationContext.getBean("orderService", OrderService.class); + + Long memberId = 1L; + Member member = new Member(memberId, "memberA", Grade.VIP); + memberService.join(member); + + Order order = orderService.createOrder(memberId, "itemA", 20000); + + System.out.println("order = " + order); + System.out.println("order.calculatePrice = " + order.calculatePrice()); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/DiscountPolicy.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/DiscountPolicy.java" new file mode 100644 index 0000000..70b2392 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/DiscountPolicy.java" @@ -0,0 +1,9 @@ +package hello.core.discount; + +import hello.core.member.Member; + +public interface DiscountPolicy { + + + int discount(Member member, int price); +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/FixDiscountPolicy.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/FixDiscountPolicy.java" new file mode 100644 index 0000000..2043005 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/FixDiscountPolicy.java" @@ -0,0 +1,18 @@ +package hello.core.discount; + +import hello.core.member.Grade; +import hello.core.member.Member; + +public class FixDiscountPolicy implements DiscountPolicy{ + + private int discountFixAmount = 1000; + + @Override + public int discount(Member member, int price) { + if (member.getGrade() == Grade.VIP) { + return discountFixAmount; + } else { + return 0; + } + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/RateDiscountPolicy.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/RateDiscountPolicy.java" new file mode 100644 index 0000000..28b9154 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/discount/RateDiscountPolicy.java" @@ -0,0 +1,19 @@ +package hello.core.discount; + +import hello.core.member.Grade; +import hello.core.member.Member; +import org.springframework.stereotype.Component; + +@Component +public class RateDiscountPolicy implements DiscountPolicy{ + + private int discountPercent = 10; + @Override + public int discount(Member member, int price) { + if (member.getGrade() == Grade.VIP) { + return price * discountPercent / 100; + } else { + return 0; + } + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/Grade.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/Grade.java" new file mode 100644 index 0000000..567399b --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/Grade.java" @@ -0,0 +1,6 @@ +package hello.core.member; + +public enum Grade { + BASIC, + VIP +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/Member.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/Member.java" new file mode 100644 index 0000000..b613584 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/Member.java" @@ -0,0 +1,37 @@ +package hello.core.member; + +public class Member { + private Long id; + private String name; + private Grade grade; + + public Member(Long id, String name, Grade grade) { + this.id = id; + this.name = name; + this.grade = grade; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Grade getGrade() { + return grade; + } + + public void setGrade(Grade grade) { + this.grade = grade; + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberRepository.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberRepository.java" new file mode 100644 index 0000000..fd72710 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberRepository.java" @@ -0,0 +1,8 @@ +package hello.core.member; + +public interface MemberRepository { + + void save(Member member); + + Member findById(Long memberId); +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberService.java" new file mode 100644 index 0000000..33c155d --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberService.java" @@ -0,0 +1,8 @@ +package hello.core.member; + +public interface MemberService { + + void join(Member member); + + Member findMember(Long memberId); +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberServiceImpl.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberServiceImpl.java" new file mode 100644 index 0000000..2acbed2 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemberServiceImpl.java" @@ -0,0 +1,33 @@ +package hello.core.member; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class MemberServiceImpl implements MemberService{ + + private final MemberRepository memberRepository; + + @Autowired //ac.getBean(MemberRepository.class) + public MemberServiceImpl(MemberRepository memberRepository) { + this.memberRepository = memberRepository; + } + + // 구현체 안넣으면 NullpointEx + @Override + public void join(Member member) { + memberRepository.save(member); + // 다형성에 의해 MemoryMemberRepository 호출 + } + + @Override + public Member findMember(Long memberId) { + return memberRepository.findById(memberId); + } + + //테스트 용도 + public MemberRepository getMemberRepository() { + return memberRepository; + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemoryMemberRepository.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemoryMemberRepository.java" new file mode 100644 index 0000000..74024c3 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/member/MemoryMemberRepository.java" @@ -0,0 +1,21 @@ +package hello.core.member; + +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; + +@Component +public class MemoryMemberRepository implements MemberRepository { + + private static Map store = new HashMap<>(); + @Override + public void save(Member member) { + store.put(member.getId(), member); + } + + @Override + public Member findById(Long memberId) { + return store.get(memberId); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/Order.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/Order.java" new file mode 100644 index 0000000..7abad45 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/Order.java" @@ -0,0 +1,60 @@ +package hello.core.order; + +public class Order { + + private Long memberId; + private String itemName; + private int itemPrice; + private int discountPrice; + + public Order(Long memberId, String itemName, int itemPrice, int discountPrice) { + this.memberId = memberId; + this.itemName = itemName; + this.itemPrice = itemPrice; + this.discountPrice = discountPrice; + } + public int calculatePrice() { + return itemPrice - discountPrice; + } + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public String getItemName() { + return itemName; + } + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public int getItemPrice() { + return itemPrice; + } + + public void setItemPrice(int itemPrice) { + this.itemPrice = itemPrice; + } + + public int getDiscountPrice() { + return discountPrice; + } + + public void setDiscountPrice(int discountPrice) { + this.discountPrice = discountPrice; + } + + @Override + public String toString() { + return "Order{" + + "memberId=" + memberId + + ", itemName='" + itemName + '\'' + + ", itemPrice=" + itemPrice + + ", discountPrice=" + discountPrice + + '}'; + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/OrderService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/OrderService.java" new file mode 100644 index 0000000..e59127e --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/OrderService.java" @@ -0,0 +1,6 @@ +package hello.core.order; + +public interface OrderService { + Order createOrder(Long memberId, String itemName, int itemPrice); + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/OrderServiceImpl.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/OrderServiceImpl.java" new file mode 100644 index 0000000..e1bc798 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/java/hello/core/order/OrderServiceImpl.java" @@ -0,0 +1,36 @@ +package hello.core.order; + +import hello.core.discount.DiscountPolicy; +import hello.core.discount.FixDiscountPolicy; +import hello.core.discount.RateDiscountPolicy; +import hello.core.member.Member; +import hello.core.member.MemberRepository; +import hello.core.member.MemoryMemberRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +@Component +public class OrderServiceImpl implements OrderService{ + + private final MemberRepository memberRepository; + private DiscountPolicy discountPolicy; + + @Autowired + public OrderServiceImpl(MemberRepository memberRepository, DiscountPolicy discountPolicy) { + this.memberRepository = memberRepository; + this.discountPolicy = discountPolicy; + } + + @Override + public Order createOrder(Long memberId, String itemName, int itemPrice) { + Member member = memberRepository.findById(memberId); + int discountPrice = discountPolicy.discount(member, itemPrice); + + return new Order(memberId, itemName, itemPrice, discountPrice); + } + + public MemberRepository getMemberRepository() { + return memberRepository; + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/appConfig.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/appConfig.xml" new file mode 100644 index 0000000..76eefc9 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/appConfig.xml" @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/application.properties" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/application.properties" new file mode 100644 index 0000000..061bbe4 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/application.properties" @@ -0,0 +1 @@ +spring.application.name=core diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/logback.xml" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/logback.xml" new file mode 100644 index 0000000..497de1c --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/main/resources/logback.xml" @@ -0,0 +1,11 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%kvp- + %msg%n + + + + + + \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/CoreApplicationTests.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/CoreApplicationTests.java" new file mode 100644 index 0000000..90937b1 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/CoreApplicationTests.java" @@ -0,0 +1,13 @@ +package hello.core; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class CoreApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beandefinition/BeanDefinitionTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beandefinition/BeanDefinitionTest.java" new file mode 100644 index 0000000..b7ea8af --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beandefinition/BeanDefinitionTest.java" @@ -0,0 +1,25 @@ +package hello.core.beandefinition; + +import hello.core.AppConfig; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +public class BeanDefinitionTest { + + AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); + + @Test + @DisplayName("빈 설정 메타정보 확인") + void findApplicationBean() { + String[] beanDefinitionNames = ac.getBeanDefinitionNames(); + for (String beanDefinitionName : beanDefinitionNames) { + BeanDefinition beanDefinition = ac.getBeanDefinition(beanDefinitionName); + + if (beanDefinition.getRole() == BeanDefinition.ROLE_APPLICATION) { + System.out.println( "beanDefinitionName" + beanDefinitionName +" beanDefinition + = " + beanDefinition); + } + } + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextBasicFindTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextBasicFindTest.java" new file mode 100644 index 0000000..e5d4f7b --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextBasicFindTest.java" @@ -0,0 +1,47 @@ +package hello.core.beanfind; + +import hello.core.AppConfig; +import hello.core.member.MemberService; +import hello.core.member.MemberServiceImpl; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +import static org.assertj.core.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.*; + +public class ApplicationContextBasicFindTest { + AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); + + @Test + @DisplayName("빈 이름으로 조회") + void findBeanByName() { + MemberService memberService = ac.getBean("memberService", MemberService.class); + assertThat(memberService).isInstanceOf(MemberServiceImpl.class); + } + + @Test + @DisplayName("이름 없이 타입으로만 조회") + void findBeanByType() { + MemberService memberService = ac.getBean(MemberService.class); + assertThat(memberService).isInstanceOf(MemberServiceImpl.class); + } + + //구체에 의존하기 때문에 그다지 좋진 않음 + @Test + @DisplayName("구체 타입으로 조회") + void findBeanByName2() { + MemberService memberService = ac.getBean("memberService", MemberServiceImpl.class); + assertThat(memberService).isInstanceOf(MemberServiceImpl.class); + } + + @Test + @DisplayName("빈 이름으로 조회 X") + void findBeanByNameX() { + //ac.getBean("xxxxx", MemberService.class); + assertThrows(NoSuchBeanDefinitionException.class, + () -> ac.getBean("xxxxx", MemberService.class)); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextExtendsFindTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextExtendsFindTest.java" new file mode 100644 index 0000000..ba38593 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextExtendsFindTest.java" @@ -0,0 +1,79 @@ +package hello.core.beanfind; + +import hello.core.AppConfig; +import hello.core.discount.DiscountPolicy; +import hello.core.discount.FixDiscountPolicy; +import hello.core.discount.RateDiscountPolicy; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.Map; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class ApplicationContextExtendsFindTest { + AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(TestConfig.class); + + +// @Test +// @DisplayName("부모 타입으로 조회시, 자식이 둘 이상 있으면, 중복 오류가 발생한다.") +// void findBeanByParentTypeDuplicate() { +// DiscountPolicy bean = ac.getBean(DiscountPolicy.class); +// assertThrows(NoSuchBeanDefinitionException.class, +// () -> ac.getBean(DiscountPolicy.class)); +// } + + @Test + @DisplayName("부모 타입으로 조회시, 자식이 둘 이상 있으면, 빈 이름을 지정하면 된다.") + void findBeanByParentTypeBeanName() { + DiscountPolicy rateDiscountPolicy = ac.getBean("rateDiscountPolicy", DiscountPolicy.class); + assertThat(rateDiscountPolicy).isInstanceOf(RateDiscountPolicy.class); + + } + + @Test + @DisplayName("특정 하위 타입으로 조회") + void findBeanBySubType() { + RateDiscountPolicy bean = ac.getBean(RateDiscountPolicy.class); + assertThat(bean).isInstanceOf(RateDiscountPolicy.class); + } + + @Test + @DisplayName("부모 타입으로 모두 조회하기") + void findAllBeanByParentType() { + Map beansOfType = ac.getBeansOfType(DiscountPolicy.class); + assertThat(beansOfType.size()).isEqualTo(2); + for (String key : beansOfType.keySet()) { + System.out.println("key = " + key + " value = " + beansOfType.get(key)); + } + } + + @Test + @DisplayName("부모 타입으로 모두 조회하기 - Object") + void findAllBeanByObjectType() { + Map beansOfType = ac.getBeansOfType(Object.class); + for (String key : beansOfType.keySet()) { + System.out.println("key = " + key + " value = " + beansOfType.get(key)); + } + } + + + @Configuration + static class TestConfig { + @Bean + public DiscountPolicy rateDiscountPolicy() { + return new RateDiscountPolicy(); + } + + @Bean + public DiscountPolicy fixDiscountPolicy() { + return new FixDiscountPolicy(); + } + } + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextInfoTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextInfoTest.java" new file mode 100644 index 0000000..66c7eaa --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextInfoTest.java" @@ -0,0 +1,37 @@ +package hello.core.beanfind; + +import hello.core.AppConfig; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +public class ApplicationContextInfoTest { + + AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); + + @Test + @DisplayName("모든 빈 출력하기") + void findAllBean() { + String[] beanDefinitionNames = ac.getBeanDefinitionNames(); + for (String beanDefinitionName : beanDefinitionNames) { + Object bean = ac.getBean(beanDefinitionName); + System.out.println("name=" + beanDefinitionName + " object=" + bean); + } + } + @Test + @DisplayName("애플리케이션 빈 출력하기") + void findApplicationBean() { + String[] beanDefinitionNames = ac.getBeanDefinitionNames(); + for (String beanDefinitionName : beanDefinitionNames) { + BeanDefinition beanDefinition = ac.getBeanDefinition(beanDefinitionName); + + //Role ROLE_APPLICATION: 직접 등록한 애플리케이션 빈 + //Role ROLE_INFRASTRUCTURE: 스프링이 내부에서 사용하는 빈 + if (beanDefinition.getRole() == BeanDefinition.ROLE_APPLICATION) { + Object bean = ac.getBean(beanDefinitionName); + System.out.println("name=" + beanDefinitionName + " object=" + bean); + } + } + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextSameBeanFindTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextSameBeanFindTest.java" new file mode 100644 index 0000000..05daf03 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/beanfind/ApplicationContextSameBeanFindTest.java" @@ -0,0 +1,62 @@ +package hello.core.beanfind; + +import hello.core.AppConfig; +import hello.core.discount.DiscountPolicy; +import hello.core.member.MemberRepository; +import hello.core.member.MemoryMemberRepository; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.Map; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class ApplicationContextSameBeanFindTest { + AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(SameBeanConfig.class); + +// @Test +// @DisplayName("타입으로 조회시 같은 타입이 둘 이상 있으면 중복 오류가 발생한다") +// void findBeanByTypeDuplicate() { +// MemberRepository bean = ac.getBean(MemberRepository.class); +// assertThrows(NoSuchBeanDefinitionException.class, +// () -> ac.getBean(MemberRepository.class)); +// } + + @Test + @DisplayName("타입으로 조회시 같은 타입이 둘 이상 있으면, 빈 이름을 지정하면 된다") + void findBeanByName() { + MemberRepository memberRepository = ac.getBean("memberRepository1", MemberRepository.class); + assertThat(memberRepository).isInstanceOf(MemberRepository.class); + } + + @Test + @DisplayName("특정 타입을 모두 조회하기") + void findAllBeanByType() { + Map beansOfType = ac.getBeansOfType(MemberRepository.class); + for (String key : beansOfType.keySet()) { + System.out.println("key = " + key + " value = " + beansOfType.get(key)); + } + System.out.println("beansOfType = " + beansOfType); + assertThat(beansOfType.size()).isEqualTo(2); + } + + @Configuration + static class SameBeanConfig { + + + @Bean + public MemberRepository memberRepository1() { + return new MemoryMemberRepository(); + } + + @Bean + public MemberRepository memberRepository2() { + return new MemoryMemberRepository(); + } + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/discount/RateDiscountPolicyTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/discount/RateDiscountPolicyTest.java" new file mode 100644 index 0000000..bcde668 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/discount/RateDiscountPolicyTest.java" @@ -0,0 +1,36 @@ +package hello.core.discount; + +import hello.core.member.Grade; +import hello.core.member.Member; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.*; + +class RateDiscountPolicyTest { + RateDiscountPolicy discountPolicy = new RateDiscountPolicy(); + + @Test + @DisplayName("VIP는 10% 할인이 적용되어야 한다.") + void vip_0() { + //given + Member member = new Member(1L, "memberVIP", Grade.VIP); + //when + int discount = discountPolicy.discount(member, 10000); + //then + assertThat(discount).isEqualTo(1000); + } + + @Test + @DisplayName("VIP가 아니면 할인이 적용되지 않아야 한다.") + void vip_x() { + //given + Member member = new Member(2L, "memberVIP", Grade.BASIC); + //when + int discount = discountPolicy.discount(member, 10000); + //then + assertThat(discount).isEqualTo(0); + } +} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/member/MemberServiceTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/member/MemberServiceTest.java" new file mode 100644 index 0000000..59bdf3b --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/member/MemberServiceTest.java" @@ -0,0 +1,29 @@ +package hello.core.member; + +import hello.core.AppConfig; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class MemberServiceTest { + + MemberService memberService; + + @BeforeEach + public void beforeEach() { + AppConfig appConfig = new AppConfig(); + memberService = appConfig.memberService(); + } +// MemberService memberService = new MemberServiceImpl(); + @Test + void join() { + //given + Member member = new Member(1L, "memberA", Grade.VIP); + //when + memberService.join(member); + Member findMember = memberService.findMember(1L); + //then + Assertions.assertThat(member).isEqualTo(findMember); + + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/order/OrderServiceTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/order/OrderServiceTest.java" new file mode 100644 index 0000000..699c5f8 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/order/OrderServiceTest.java" @@ -0,0 +1,40 @@ +package hello.core.order; + +import hello.core.AppConfig; +import hello.core.member.Grade; +import hello.core.member.Member; +import hello.core.member.MemberService; +import hello.core.member.MemberServiceImpl; +import hello.core.order.Order; +import hello.core.order.OrderService; +import hello.core.order.OrderServiceImpl; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class OrderServiceTest { + MemberService memberService; + OrderService orderService; + + @BeforeEach + public void beforeEach() { + AppConfig appConfig = new AppConfig(); + memberService = appConfig.memberService(); + orderService = appConfig.orderService(); + } +// MemberService memberService = new MemberServiceImpl(); +// OrderService orderService = new OrderServiceImpl(); + + @Test + void creatOrder() { + Long memberId = 1L; + Member member = new Member(memberId, "memberA", Grade.VIP); + memberService.join(member); + + Order order = orderService.createOrder(memberId, "itemA", 10000); + Assertions.assertThat(order.getDiscountPrice()).isEqualTo(1000); + + } + + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/AutoAppConfigTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/AutoAppConfigTest.java" new file mode 100644 index 0000000..aa29643 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/AutoAppConfigTest.java" @@ -0,0 +1,19 @@ +package hello.core.scan; + +import hello.core.AutoAppConfig; +import hello.core.member.MemberRepository; +import hello.core.member.MemberService; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +public class AutoAppConfigTest { + + @Test + void basicScan() { + AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AutoAppConfig.class); + + MemberService memberService = ac.getBean(MemberService.class); + Assertions.assertThat(memberService).isInstanceOf(MemberService.class); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/BeanA.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/BeanA.java" new file mode 100644 index 0000000..a7f4b23 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/BeanA.java" @@ -0,0 +1,5 @@ +package hello.core.scan.filter; + +@MyIncludeComponent +public class BeanA { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/BeanB.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/BeanB.java" new file mode 100644 index 0000000..56fac76 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/BeanB.java" @@ -0,0 +1,5 @@ +package hello.core.scan.filter; + +@MyExcludeComponent +public class BeanB { +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/ComponentFilterAppConfigTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/ComponentFilterAppConfigTest.java" new file mode 100644 index 0000000..61b71f1 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/ComponentFilterAppConfigTest.java" @@ -0,0 +1,38 @@ +package hello.core.scan.filter; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.stereotype.Component; + +import static org.assertj.core.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.*; +import static org.springframework.context.annotation.ComponentScan.*; + +public class ComponentFilterAppConfigTest { + + @Test + void filterScan() { + ApplicationContext ac = new AnnotationConfigApplicationContext(ComponentFilterAppConfig.class); + BeanA beanA = ac.getBean("beanA", BeanA.class); + assertThat(beanA).isNotNull(); + + assertThrows( + NoSuchBeanDefinitionException.class, + () -> ac.getBean("beanB", BeanB.class)); + } + + @Configuration + @ComponentScan( + includeFilters = @Filter(type = FilterType.ANNOTATION, classes = MyIncludeComponent.class), + excludeFilters = @Filter(type = FilterType.ANNOTATION, classes = MyExcludeComponent.class) + ) + static class ComponentFilterAppConfig { + + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/MyExcludeComponent.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/MyExcludeComponent.java" new file mode 100644 index 0000000..010814d --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/MyExcludeComponent.java" @@ -0,0 +1,9 @@ +package hello.core.scan.filter; + +import java.lang.annotation.*; +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface MyExcludeComponent { + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/MyIncludeComponent.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/MyIncludeComponent.java" new file mode 100644 index 0000000..ced73de --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/scan/filter/MyIncludeComponent.java" @@ -0,0 +1,10 @@ +package hello.core.scan.filter; + +import java.lang.annotation.*; + +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface MyIncludeComponent { + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/ConfigurationSingletonTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/ConfigurationSingletonTest.java" new file mode 100644 index 0000000..47bf204 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/ConfigurationSingletonTest.java" @@ -0,0 +1,41 @@ +package hello.core.singleton; + +import hello.core.AppConfig; +import hello.core.member.MemberRepository; +import hello.core.member.MemberServiceImpl; +import hello.core.order.OrderServiceImpl; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +import static org.assertj.core.api.Assertions.*; + +public class ConfigurationSingletonTest { + + @Test + void configurationTest() { + ApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); + + MemberServiceImpl memberService = ac.getBean("memberService", MemberServiceImpl.class); + OrderServiceImpl orderService = ac.getBean("orderService", OrderServiceImpl.class); + MemberRepository memberRepository = ac.getBean("memberRepository", MemberRepository.class); + + MemberRepository memberRepository1 = memberService.getMemberRepository(); + MemberRepository memberRepository2 = orderService.getMemberRepository(); + System.out.println("memberService -> memberRepository = " + memberRepository1); + System.out.println("memberService -> memberRepository = " + memberRepository2); + System.out.println("memberRepository = " + memberRepository); + + assertThat(memberService.getMemberRepository()).isSameAs(memberRepository); + assertThat(orderService.getMemberRepository()).isSameAs(memberRepository); + } + + @Test + void configurationDeep() { + ApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); + AppConfig bean = ac.getBean(AppConfig.class); + + System.out.println("bean = " + bean.getClass()); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/SingletonService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/SingletonService.java" new file mode 100644 index 0000000..341f59b --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/SingletonService.java" @@ -0,0 +1,18 @@ +package hello.core.singleton; + +public class SingletonService { + + private static final SingletonService instance = new SingletonService(); + + public static SingletonService getInstance() { + return instance; + } + + private SingletonService() { + + } + + public void logic() { + System.out.println("싱글톤 객체 로직 호출"); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/SingletonTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/SingletonTest.java" new file mode 100644 index 0000000..4234193 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/SingletonTest.java" @@ -0,0 +1,57 @@ +package hello.core.singleton; + +import hello.core.AppConfig; +import hello.core.member.MemberService; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +import static org.assertj.core.api.Assertions.*; + +public class SingletonTest { + + @Test + @DisplayName("스프링 없는 순수한 DI컨테이너") + void pureContainer() { + AppConfig appConfig = new AppConfig(); + //1. 조회 : 호출할 때 마다 객체를 생성 + MemberService memberService1 = appConfig.memberService(); + + MemberService memberService2 = appConfig.memberService(); + + System.out.println("memberService1 = " + memberService1); + System.out.println("memberService2 = " + memberService2); + + assertThat(memberService1).isNotSameAs(memberService2); + } + + @Test + @DisplayName("싱글톤 패턴을 적용한 객체 사용") + void singletonServiceTest() { + SingletonService singletonService1 = SingletonService.getInstance(); + SingletonService singletonService2 = SingletonService.getInstance(); + + System.out.println("singletonService1 = " + singletonService1); + System.out.println("singletonService2 = " + singletonService2); + + assertThat(singletonService1).isSameAs(singletonService2); + + } + + @Test + @DisplayName("스프링 컨테이너와 싱글톤") + void springContatiner() { +// AppConfig appConfig = new AppConfig(); + ApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class); + + MemberService memberService1 = ac.getBean("memberService", MemberService.class); + MemberService memberService2 = ac.getBean("memberService", MemberService.class); + + System.out.println("memberService1 = " + memberService1); + System.out.println("memberService2 = " + memberService2); + + assertThat(memberService1).isSameAs(memberService2); + } +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/StatefulService.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/StatefulService.java" new file mode 100644 index 0000000..1e73179 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/StatefulService.java" @@ -0,0 +1,13 @@ +package hello.core.singleton; + +public class StatefulService { + +// private int price; + + public int order(String name, int price) { + System.out.println("name = " + name + " price = " + price); +// this.price = price; //여기가 문제 + return price; + } + +} diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/StatefulServiceTest.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/StatefulServiceTest.java" new file mode 100644 index 0000000..4291618 --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/singleton/StatefulServiceTest.java" @@ -0,0 +1,37 @@ +package hello.core.singleton; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Bean; + +import static org.junit.jupiter.api.Assertions.*; + +class StatefulServiceTest { + + @Test + void statefulSetviceSingleton() { + ApplicationContext ac = new AnnotationConfigApplicationContext(TestConfig.class); + StatefulService statefulService1 = ac.getBean(StatefulService.class); + StatefulService statefulService2 = ac.getBean(StatefulService.class); + + //ThreadA: A사용자 10000원 주문 + int userAPrice = statefulService1.order("userA", 10000); + //ThreadB: B사용자 20000원 주문 + int userBPrice = statefulService2.order("userA", 20000); + + //ThreadA: 사용자A 주문 금액 조회 +// int price = statefulService1.getPrice(); + System.out.println("price = " + userAPrice); + +// Assertions.assertThat(statefulService1.getPrice()).isEqualTo(20000); + } + + static class TestConfig { + @Bean + public StatefulService statefulService() { + return new StatefulService(); + } + } +} \ No newline at end of file diff --git "a/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/xmp/XmlAppContext.java" "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/xmp/XmlAppContext.java" new file mode 100644 index 0000000..55a249d --- /dev/null +++ "b/ity0526/\354\212\244\355\224\204\353\247\201 \355\225\265\354\213\254 \354\233\220\353\246\254 - \352\270\260\353\263\270\355\216\270/src/test/java/hello/core/xmp/XmlAppContext.java" @@ -0,0 +1,16 @@ +package hello.core.xmp; + +import hello.core.member.MemberService; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.GenericXmlApplicationContext; + +public class XmlAppContext { + @Test + void xmlAppContext() { + ApplicationContext ac = new GenericXmlApplicationContext("appConfig.xml"); + MemberService memberService = ac.getBean("memberService", MemberService.class); + Assertions.assertThat(memberService).isInstanceOf(MemberService.class); + } +} diff --git "a/ity0526/\354\233\214\355\201\254\353\266\201/README.md" "b/ity0526/\354\233\214\355\201\254\353\266\201/README.md" new file mode 100644 index 0000000..cb8e3f7 --- /dev/null +++ "b/ity0526/\354\233\214\355\201\254\353\266\201/README.md" @@ -0,0 +1,8 @@ +# Chapter 4 + +--- + +**SQL**(Structured Query Language) + +-관계형 데이터베이스를 다룰 때 사용되는 표준 언어 +