From 9895e126b652a631290ca7ff97f40f22bd0ac36f Mon Sep 17 00:00:00 2001 From: 0BVer Date: Wed, 4 May 2022 18:47:00 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore=20:=20PR=20=EC=A4=91=20=EB=8D=AE?= =?UTF-8?q?=EC=96=B4=EC=94=8C=EC=9B=8C=EC=A0=B8=EB=B2=84=EB=A6=B0=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/application.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 464d262..18c32cd 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -70,16 +70,16 @@ spring: 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 +auth-properties: + token-properties: + token-secret-key: 'asodfhwoeihro1i34u1097r09u13rqfasc12' + token-expire-date: 1800000 + refresh-token-expiry: 604800000 + jwt-properties: + secret-key: 'HJJangHandsomeGnuKenny120hy12049h014' + cors-properties: + allowed-origins: 'localhost:3000,http://localhost,http://localhost:3000' + allowed-methods: 'GET,POST,PUT,DELETE,OPTIONS' allowed-headers: '*' max-age: 3600 oAuth2Properties: From 59aa0017f5f4e49eddfab7869413c13721c7da5c Mon Sep 17 00:00:00 2001 From: 0BVer Date: Wed, 4 May 2022 19:01:13 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat=20:=20application.yml=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=B6=84=EB=A6=AC=20=EB=B0=8F=20git.ignore=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.gitignore | 3 + .../resources/application-auth.yml.template | 39 ++++++++++++ .../resources/application-db.yml.template | 25 ++++++++ .../resources/application-email.yml.template | 12 ++++ backend/src/main/resources/application.yml | 63 +------------------ 5 files changed, 82 insertions(+), 60 deletions(-) create mode 100644 backend/src/main/resources/application-auth.yml.template create mode 100644 backend/src/main/resources/application-db.yml.template create mode 100644 backend/src/main/resources/application-email.yml.template diff --git a/backend/.gitignore b/backend/.gitignore index 2a17aab..4e98f71 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -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 diff --git a/backend/src/main/resources/application-auth.yml.template b/backend/src/main/resources/application-auth.yml.template new file mode 100644 index 0000000..aa37662 --- /dev/null +++ b/backend/src/main/resources/application-auth.yml.template @@ -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: + - + - \ No newline at end of file diff --git a/backend/src/main/resources/application-db.yml.template b/backend/src/main/resources/application-db.yml.template new file mode 100644 index 0000000..4c72e8f --- /dev/null +++ b/backend/src/main/resources/application-db.yml.template @@ -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 \ No newline at end of file diff --git a/backend/src/main/resources/application-email.yml.template b/backend/src/main/resources/application-email.yml.template new file mode 100644 index 0000000..024e521 --- /dev/null +++ b/backend/src/main/resources/application-email.yml.template @@ -0,0 +1,12 @@ +spring: + mail: + host: + port: + username: + password: + properties: + mail: + smtp: + auth: true + starttls: + enable: true \ No newline at end of file diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 18c32cd..ff38443 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -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: @@ -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-properties: - token-properties: - token-secret-key: 'asodfhwoeihro1i34u1097r09u13rqfasc12' - token-expire-date: 1800000 - refresh-token-expiry: 604800000 - jwt-properties: - secret-key: 'HJJangHandsomeGnuKenny120hy12049h014' - cors-properties: - allowed-origins: 'localhost:3000,http://localhost,http://localhost:3000' - allowed-methods: 'GET,POST,PUT,DELETE,OPTIONS' - allowed-headers: '*' - max-age: 3600 - oAuth2Properties: - redirectUris: - - 'http://localhost:3000/oauth/redirect' - - 'https://getpostman.com/oauth2/redirect' \ No newline at end of file