diff --git a/.gitignore b/.gitignore index 64b3113..d0505fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ +HELP.md +build +target +.idea +.gradle + # Created by https://www.toptal.com/developers/gitignore/api/java,intellij # Edit at https://www.toptal.com/developers/gitignore?templates=java,intellij diff --git a/.gradle/6.4.1/executionHistory/executionHistory.bin b/.gradle/6.4.1/executionHistory/executionHistory.bin deleted file mode 100644 index f28538e..0000000 Binary files a/.gradle/6.4.1/executionHistory/executionHistory.bin and /dev/null differ diff --git a/.gradle/6.4.1/executionHistory/executionHistory.lock b/.gradle/6.4.1/executionHistory/executionHistory.lock deleted file mode 100644 index b3ae5c5..0000000 Binary files a/.gradle/6.4.1/executionHistory/executionHistory.lock and /dev/null differ diff --git a/.gradle/6.4.1/fileChanges/last-build.bin b/.gradle/6.4.1/fileChanges/last-build.bin deleted file mode 100644 index f76dd23..0000000 Binary files a/.gradle/6.4.1/fileChanges/last-build.bin and /dev/null differ diff --git a/.gradle/6.4.1/fileContent/fileContent.lock b/.gradle/6.4.1/fileContent/fileContent.lock deleted file mode 100644 index 592f3d3..0000000 Binary files a/.gradle/6.4.1/fileContent/fileContent.lock and /dev/null differ diff --git a/.gradle/6.4.1/fileHashes/fileHashes.bin b/.gradle/6.4.1/fileHashes/fileHashes.bin deleted file mode 100644 index 60aaa34..0000000 Binary files a/.gradle/6.4.1/fileHashes/fileHashes.bin and /dev/null differ diff --git a/.gradle/6.4.1/fileHashes/fileHashes.lock b/.gradle/6.4.1/fileHashes/fileHashes.lock deleted file mode 100644 index e3aea1c..0000000 Binary files a/.gradle/6.4.1/fileHashes/fileHashes.lock and /dev/null differ diff --git a/.gradle/6.4.1/gc.properties b/.gradle/6.4.1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.gradle/6.4.1/javaCompile/classAnalysis.bin b/.gradle/6.4.1/javaCompile/classAnalysis.bin deleted file mode 100644 index 1e91af5..0000000 Binary files a/.gradle/6.4.1/javaCompile/classAnalysis.bin and /dev/null differ diff --git a/.gradle/6.4.1/javaCompile/javaCompile.lock b/.gradle/6.4.1/javaCompile/javaCompile.lock deleted file mode 100644 index e2ee347..0000000 Binary files a/.gradle/6.4.1/javaCompile/javaCompile.lock and /dev/null differ diff --git a/.gradle/6.4.1/javaCompile/taskHistory.bin b/.gradle/6.4.1/javaCompile/taskHistory.bin deleted file mode 100644 index c6c8eb2..0000000 Binary files a/.gradle/6.4.1/javaCompile/taskHistory.bin and /dev/null differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index f695bda..0000000 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and /dev/null differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index 9e9d27b..0000000 --- a/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Tue Aug 25 03:52:59 KST 2020 -gradle.version=6.4.1 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index 6db84e7..0000000 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and /dev/null differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock deleted file mode 100644 index 845fba7..0000000 Binary files a/.gradle/checksums/checksums.lock and /dev/null differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin deleted file mode 100644 index f087463..0000000 Binary files a/.gradle/checksums/md5-checksums.bin and /dev/null differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin deleted file mode 100644 index eb09c3b..0000000 Binary files a/.gradle/checksums/sha1-checksums.bin and /dev/null differ diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29..0000000 diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 476363b..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -server-user \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index fdc392f..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 00421f5..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/HELP.md b/HELP.md deleted file mode 100644 index 3206a0e..0000000 --- a/HELP.md +++ /dev/null @@ -1,22 +0,0 @@ -# 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/2.3.3.RELEASE/gradle-plugin/reference/html/) -* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/gradle-plugin/reference/html/#build-image) -* [Spring Web](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications) - -### Guides -The following guides illustrate how to use some features concretely: - -* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) -* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) -* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/) - -### 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/build.gradle b/build.gradle index 372296f..f48b952 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,9 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + runtime('com.h2database:h2') + compileOnly('org.projectlombok:lombok') testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } diff --git a/build/resources/main/application.properties b/build/resources/main/application.properties deleted file mode 100644 index 8b13789..0000000 --- a/build/resources/main/application.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/build/tmp/bootJar/MANIFEST.MF b/build/tmp/bootJar/MANIFEST.MF deleted file mode 100644 index dfcb173..0000000 --- a/build/tmp/bootJar/MANIFEST.MF +++ /dev/null @@ -1,8 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: org.springframework.boot.loader.JarLauncher -Start-Class: org.siba.serveruser.ServerUserApplication -Spring-Boot-Version: 2.3.3.RELEASE -Spring-Boot-Classes: BOOT-INF/classes/ -Spring-Boot-Lib: BOOT-INF/lib/ -Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx - diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 62d4c05..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4f0001..b79073f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Mon Sep 07 09:54:22 KST 2020 +distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/resources/application-database.yml b/src/main/resources/application-database.yml new file mode 100644 index 0000000..37442f5 --- /dev/null +++ b/src/main/resources/application-database.yml @@ -0,0 +1,8 @@ + +# 테스트 환경과 프로덕션 환경에서 사용할 데이터베이스 관련 프로파일 +spring: +# datasource: +# url: +# username: +# password: +# driver-class-name: diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..6e0faa4 --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -0,0 +1,19 @@ + +# 개발 환경에서 적용시킬 프로파일 +spring: + h2: + console: + enabled: true # 웹 콘솔 사용 + path: /h2-siba-console # 웹 콘솔 접속 경로 + + datasource: + url: jdbc:h2:mem:siba # http://www.h2database.com/html/features.html#connection_modes + driver-class-name: org.h2.Driver + username: siba + password: siba + #data: classpath:h2.sql 애플리케이션 구동 시 실행시킬 스크립트 + + jpa: + show-sql: true + hibernate: + ddl-auto: create-drop # 테이블 자동 생성 및 드랍 \ No newline at end of file diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..a3308c5 --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,5 @@ + +# 프로덕션 환경에서 적용시킬 프로파일 +spring: + profiles: + include: database \ No newline at end of file diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..2f1f7a7 --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,5 @@ + +# 테스트 환경에서 적용 시킬 프로파일 +spring: + profiles: + include: database \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 8b13789..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..a9e2c51 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,7 @@ + +spring: + profiles: + active: test + +server: + port: 8080 \ No newline at end of file