Skip to content

Commit

Permalink
Merge pull request #47 from h-jjang/feature/#39-applicationyml-기능별-분리…
Browse files Browse the repository at this point in the history
…-및-gitignore-처리

39 application.yml 기능별 분리 및 git.ignore 처리
  • Loading branch information
0BVer authored May 5, 2022
2 parents c7ac128 + 59aa001 commit 50a784d
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 60 deletions.
3 changes: 3 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ hs_err_pid*

/src/main/resources/application-aws.yml
/src/main/resources/application-credentials.yml
/src/main/resources/application-auth.yml
/src/main/resources/application-db.yml
/src/main/resources/application-email.yml
39 changes: 39 additions & 0 deletions backend/src/main/resources/application-auth.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
spring:
# oauth 설정
security:
oauth2.client:
registration:
kakao:
clientId:
clientSecret:
clientAuthenticationMethod:
authorizationGrantType:
redirectUri:
scope:
- profile_nickname
- profile_image
- account_email
clientName:
provider:
kakao:
authorizationUri:
tokenUri:
userInfoUri:
userNameAttribute:

auth-properties:
token-properties:
token-secret-key:
token-expire-date:
refresh-token-expiry:
jwt-properties:
secret-key:
cors-properties:
allowed-origins:
allowed-methods:
allowed-headers:
max-age:
oAuth2Properties:
redirectUris:
-
-
25 changes: 25 additions & 0 deletions backend/src/main/resources/application-db.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
spring:
datasource:
driver-class-name:
url:
username:
password:

jpa:
database:
show-sql:
hibernate:
ddl-auto:
properties:
hibernate:
format_sql: true
generate-ddl: true

flyway:
enabled: false
url:
user:
password:
baseline-on-migrate: true
ignore-ignored-migrations: true
clean-on-validation-error: true
12 changes: 12 additions & 0 deletions backend/src/main/resources/application-email.yml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
spring:
mail:
host:
port:
username:
password:
properties:
mail:
smtp:
auth: true
starttls:
enable: true
63 changes: 3 additions & 60 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,16 @@ spring:
name: "backend"
profiles:
include:
- db
- auth
- email
- aws
- credentials
datasource:
driver-class-name: "com.mysql.cj.jdbc.Driver"
url: "jdbc:mysql://localhost:3306/test_db?useSSL=false&useLegacyDatetimeCode=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Seoul&characterEncoding=UTF-8&autoReconnect=true&createDatabaseIfNotExist=true"
username: "root"
password: "0000"

redis:
host: bauction-redis
port: 6379

jpa:
database: "mysql"
show-sql: "true"
hibernate:
ddl-auto: "update"
properties:
hibernate:
format_sql: true
generate-ddl: true
#----- for swagger UI
# mvc:
# pathmatch:
Expand All @@ -34,55 +23,9 @@ spring:
# schema-locations: classpath:scheme.sql
# data-locations: classpath:data.sql
# mode: always
flyway:
enabled: false
url: jdbc:mysql://localhost:3306/test_db
user: root
password: 0000
baseline-on-migrate: true
ignore-ignored-migrations: true
clean-on-validation-error: true

# oauth 설정
security:
oauth2.client:
registration:
kakao:
clientId: '2de38f203dbe5dc3a59740cb5f8438a3'
clientSecret: 'U5Pq6S2H2A52ANmKwn5fxoF5mYL3cTFU'
clientAuthenticationMethod: post
authorizationGrantType: authorization_code
redirectUri: "http://localhost:8080/login/oauth2/code/kakao"
scope:
- profile_nickname
- profile_image
- account_email
clientName: Kakao
provider:
kakao:
authorizationUri: https://kauth.kakao.com/oauth/authorize
tokenUri: https://kauth.kakao.com/oauth/token
userInfoUri: https://kapi.kakao.com/v2/user/me
userNameAttribute: id

servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB

auth:
tokenProperties:
tokenSecretKey: asodfhwoeihro1i34u1097r09u13rqfasc12
tokenExpireDate: 1800000
refreshTokenExpiry: 604800000
jwtProperties:
secretKey: 'HJJangHandsomeGnuKenny120hy12049h014'
corsProperties:
allowed-origins: '*'
allowed-methods: GET,POST,PUT,DELETE,OPTIONS
allowed-headers: '*'
max-age: 3600
oAuth2Properties:
redirectUris:
- 'http://localhost:3000/oauth/redirect'
- 'https://getpostman.com/oauth2/redirect'

0 comments on commit 50a784d

Please sign in to comment.