Skip to content

Commit

Permalink
BE 초기 세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
JONG-KYEONG committed Aug 12, 2024
1 parent 7778832 commit 6f81961
Show file tree
Hide file tree
Showing 108 changed files with 2,183 additions and 0 deletions.
Binary file added server/.gradle/8.8/checksums/checksums.lock
Binary file not shown.
Binary file added server/.gradle/8.8/checksums/md5-checksums.bin
Binary file not shown.
Binary file added server/.gradle/8.8/checksums/sha1-checksums.bin
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file added server/.gradle/8.8/fileChanges/last-build.bin
Binary file not shown.
Binary file added server/.gradle/8.8/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added server/.gradle/8.8/fileHashes/fileHashes.lock
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
2 changes: 2 additions & 0 deletions server/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Fri Aug 09 17:33:28 KST 2024
gradle.version=8.8
Binary file added server/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file added server/.gradle/file-system.probe
Binary file not shown.
Empty file.
22 changes: 22 additions & 0 deletions server/HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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/3.3.2/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.3.2/gradle-plugin/packaging-oci-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.3.2/reference/htmlsingle/index.html#web)

### 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/rest/)

### Additional Links
These additional references should also help you:

* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)

52 changes: 52 additions & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.0.5'
id 'io.spring.dependency-management' version '1.1.3'
}

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

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'mysql:mysql-connector-java:8.0.26'
runtimeOnly 'com.mysql:mysql-connector-j'

implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'

runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:2.7.4'

compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.2'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.2'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.2'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
95 changes: 95 additions & 0 deletions server/build/resources/main/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#spring.datasource.url=${DB_URL}
#spring.datasource.username=${USERNAME}
#spring.datasource.password=${PASSWORD}
#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#
#spring.jpa.show-sql=true
#spring.jpa.hibernate.ddl-auto=update
#
##GoogleOAuth
#spring.security.oauth2.client.registration.google.client-id=${GOOGLE_ID}
#spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_SECRET}
#spring.security.oauth2.client.registration.google.redirect-uri=https://port-0-hackathon-be-lyqylohp8957ca6e.sel5.cloudtype.app/oauth2/callback/google
#spring.security.oauth2.client.registration.google.scope=email,profile
#
##GithubOAuth
#spring.security.oauth2.client.registration.github.client-id=${GITHUB_ID}
#spring.security.oauth2.client.registration.github.client-secret=${GITHUB_SECRET}
#spring.security.oauth2.client.registration.github.redirect-uri=https://port-0-hackathon-be-lyqylohp8957ca6e.sel5.cloudtype.app/oauth2/callback/github
#spring.security.oauth2.client.registration.github.scope=user:email,read:user
#
##KakaoTalk OAuth
#spring.security.oauth2.client.registration.kakao.client-id=${KAKAO_ID}
#spring.security.oauth2.client.registration.kakao.client-secret=${KAKAO_SECRET}
#spring.security.oauth2.client.provider.kakao.authorization-uri=https://kauth.kakao.com/oauth/authorize
#spring.security.oauth2.client.registration.kakao.scope=profile_nickname,profile_image,account_email
#spring.security.oauth2.client.registration.kakao.client-name=kakao-login
#spring.security.oauth2.client.registration.kakao.authorization-grant-type=authorization_code
#spring.security.oauth2.client.registration.kakao.redirect-uri=https://port-0-hackathon-be-lyqylohp8957ca6e.sel5.cloudtype.app/oauth2/callback/kakao
#spring.security.oauth2.client.registration.kakao.client-authentication-method=client_secret_post
#spring.security.oauth2.client.provider.kakao.token-uri=https://kauth.kakao.com/oauth/token
#spring.security.oauth2.client.provider.kakao.user-info-uri=https://kapi.kakao.com/v2/user/me
#spring.security.oauth2.client.provider.kakao.user-name-attribute=id
#
##Naver OAuth
#spring.security.oauth2.client.registration.naver.client-id=${NAVER_ID}
#spring.security.oauth2.client.registration.naver.client-secret=${NAVER_SECRET}
#spring.security.oauth2.client.registration.naver.scope=name, email, profile_image, nickname
#spring.security.oauth2.client.registration.naver.client-name=Naver
#spring.security.oauth2.client.registration.naver.authorization-grant-type=authorization_code
#spring.security.oauth2.client.registration.naver.redirect-uri=https://port-0-hackathon-be-lyqylohp8957ca6e.sel5.cloudtype.app/oauth2/callback/naver
#spring.security.oauth2.client.provider.naver.authorization-uri=https://nid.naver.com/oauth2.0/authorize
#spring.security.oauth2.client.provider.naver.token-uri=https://nid.naver.com/oauth2.0/token
#spring.security.oauth2.client.provider.naver.user-info-uri=https://openapi.naver.com/v1/nid/me
#spring.security.oauth2.client.provider.naver.user-name-attribute=response
#
##AWS
#cloud.aws.credentials.accessKey=${S3_ACCESSKEY}
#cloud.aws.credentials.secretKey=${S3_SECRETKEY}
#cloud.aws.s3.bucket=${BUCKET_NAME}
#cloud.aws.region.static=ap-northeast-2
#cloud.aws.stack.auto=false
#
#app.auth.tokenSecret=04ca023b39512e46d0c2cf4b48d5aac61d34302994c87ed4eff225dcf3b0a218739f3897051a057f9b846a69ea2927a587044164b7bae5e1306219d50b588cb1
#app.auth.tokenExpirationMsec = 864000000
#app.cors.allowedOrigins=http://localhost:3000,http://localhost:8080,https://port-0-hackathon-be-lyqylohp8957ca6e.sel5.cloudtype.app/
#app.oauth2.authorizedRedirectUris=http://localhost:3000/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect

#Spring Data JPA
spring.datasource.url=jdbc:mysql://localhost:3306/hackathon?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=0322
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update

# spring boot 2.5.x to use script
spring.sql.init.mode=always
# script use after hibernate initilalization
spring.jpa.defer-datasource-initialization=true

#OAuth2
#???
spring.security.oauth2.client.registration.google.client-id=240772131497-d17ho20q4gb42n5s42ncohdh5k9379rc.apps.googleusercontent.com
spring.security.oauth2.client.registration.google.client-secret=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
spring.security.oauth2.client.registration.google.redirect-uri=http://glogglogglog-env.eba-fuksumx7.ap-northeast-2.elasticbeanstalk.com/oauth2/callback/google
spring.security.oauth2.client.registration.google.scope=email,profile

spring.security.oauth2.client.registration.github.client-id=4260b239158564b38116
spring.security.oauth2.client.registration.github.client-secret=40bbeeda1c6175ec4819cf96e427e631e7b5aa8e
spring.security.oauth2.client.registration.github.redirect-uri=http://localhost:8080/oauth2/callback/github
spring.security.oauth2.client.registration.github.scope=user:email,read:user

app.auth.tokenSecret=04ca023b39512e46d0c2cf4b48d5aac61d34302994c87ed4eff225dcf3b0a218739f3897051a057f9b846a69ea2927a587044164b7bae5e1306219d50b588cb1
app.auth.tokenExpirationMsec = 864000000
app.cors.allowedOrigins=https://glog-beta.vercel.app,http://localhost:3000,http://localhost:8080
app.oauth2.authorizedRedirectUris=https://glog-beta.vercel.app/oauth2/redirect,http://localhost:3000/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect
app.GitHub.gitHubToken=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

#AWS
cloud.aws.credentials.accessKey=AKIA6ODUZVK7N2P6RB6C
cloud.aws.credentials.secretKey=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
cloud.aws.s3.bucket=glog-image-bucket
cloud.aws.region.static=ap-northeast-2
cloud.aws.stack.auto=false
Binary file not shown.
Binary file not shown.
Binary file added server/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions server/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 6f81961

Please sign in to comment.