24.01.23
schedule cron 외부 노출 막기
spring:
config:
import: optional:file:.env[.properties]
datasource:
url: jdbc:mysql://localhost:${LOCAL_MYSQL_PORT}/scbj?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${LOCAL_MYSQL_USERNAME}
password: ${LOCAL_MYSQL_PASSWORD}
jpa:
hibernate:
ddl-auto: create
show-sql: true
properties:
hibernate:
format_sql: true
data:
redis:
host: localhost
port: 6379
mail:
host: smtp.gmail.com
port: 587
username: ${EMAIL_SERVICE_USERNAME}
password: ${EMAIL_SERVICE_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
auth-code-expiration-millis: 900000
jwt:
secret: KF81YSUjd3Q3KCFfaXd6cHlwMyNAKitkamFtYj02OXh2X3JfN2sqZShyamQrZysoXzVhJSN3dDcoIV9pd3pweXAzI0AqK2RqYW1iPTY5eHZfcl83ayplKHJqZCtnKw== # Replace with your actual secret key
expiration: 3600000 # Replace with your desired expiration time in milliseconds
refreshExpiration: 604800000 # Replace with your desired refresh expiration time in milliseconds
redisRefreshKeyPrefix: "Refresh-token:" # Replace with your desired Redis refresh key prefix
fcm:
request-url: "<https://fcm.googleapis.com/v1/projects/scbj-af2e3/messages:send>"
credential-path: "/credential/fcm-service-key.json"
scope : "<https://www.googleapis.com/auth/cloud-platform>"
kakao-api:
api-key : ${API-KEY}
server:
url : ${SERVER-URL}
schedule:
cron: ${SCHEDULE-CRON}
24.01.22
baseUrl 배포 서버로 변경
spring:
config:
import: optional:file:.env[.properties]
datasource:
url: jdbc:h2:mem:testdb
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
hibernate:
ddl-auto: create
show-sql: true
properties:
hibernate:
dialect: org.hibernate.dialect.H2Dialect
data:
redis:
host: localhost
port: 6379
mail:
host: smtp.gmail.com
port: 587
username: ${EMAIL_SERVICE_USERNAME}
password: ${EMAIL_SERVICE_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
auth-code-expiration-millis: 900000
jwt:
secret: KF81YSUjd3Q3KCFfaXd6cHlwMyNAKitkamFtYj02OXh2X3JfN2sqZShyamQrZysoXzVhJSN3dDcoIV9pd3pweXAzI0AqK2RqYW1iPTY5eHZfcl83ayplKHJqZCtnKw== # Replace with your actual secret key
expiration: 3600000 # Replace with your desired expiration time in milliseconds
refreshExpiration: 604800000 # Replace with your desired refresh expiration time in milliseconds
redisRefreshKeyPrefix: "Refresh-token:" # Replace with your desired Redis refresh key prefix
fcm:
request-url: "<https://fcm.googleapis.com/v1/projects/scbj-af2e3/messages:send>"
credential-path: "/credential/fcm-service-key.json"
scope : "<https://www.googleapis.com/auth/cloud-platform>"
kakao-api:
api-key : ${API-KEY}
server:
url : ${SERVER-URL}
spring:
config:
import: optional:file:.env[.properties]
datasource:
url: jdbc:h2:mem:testdb
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
hibernate:
ddl-auto: create
show-sql: true
properties:
hibernate:
dialect: org.hibernate.dialect.H2Dialect
data:
redis:
host: localhost
port: 6379
mail:
host: smtp.gmail.com
port: 587
username: ${EMAIL_SERVICE_USERNAME}
password: ${EMAIL_SERVICE_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
auth-code-expiration-millis: 900000
jwt:
secret: KF81YSUjd3Q3KCFfaXd6cHlwMyNAKitkamFtYj02OXh2X3JfN2sqZShyamQrZysoXzVhJSN3dDcoIV9pd3pweXAzI0AqK2RqYW1iPTY5eHZfcl83ayplKHJqZCtnKw== # Replace with your actual secret key
expiration: 3600000 # Replace with your desired expiration time in milliseconds
refreshExpiration: 604800000 # Replace with your desired refresh expiration time in milliseconds
redisRefreshKeyPrefix: "Refresh-token:" # Replace with your desired Redis refresh key prefix
fcm:
request-url: "<https://fcm.googleapis.com/v1/projects/scbj-af2e3/messages:send>"
credential-path: "/credential/fcm-service-key.json"
scope : "<https://www.googleapis.com/auth/cloud-platform>"
kakao-api:
api-key : ${API-KEY}
server:
url : ${SERVER-URL}ㄹ
24.01.14
FCM 관련 환경 설정 추가
spring:
datasource:
url: jdbc:mysql://localhost:${LOCAL_MYSQL_PORT}/scbj?useSSL=false&useUnicode=true&allowPublicKeyRetrieval=true
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${LOCAL_MYSQL_USERNAME}
password: ${LOCAL_MYSQL_PASSWORD}
jpa:
hibernate:
ddl-auto: update
show-sql: true
data:
redis:
host: localhost
port: 6379
mail:
host: smtp.gmail.com
port: 587
username: ${EMAIL_SERVICE_USERNAME}
password: ${EMAIL_SERVICE_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
jwt:
secret: KF81YSUjd3Q3KCFfaXd6cHlwMyNAKitkamFtYj02OXh2X3JfN2sqZShyamQrZysoXzVhJSN3dDcoIV9pd3pweXAzI0AqK2RqYW1iPTY5eHZfcl83ayplKHJqZCtnKw== # Replace with your actual secret key
expiration: 3600000 # Replace with your desired expiration time in milliseconds
refreshExpiration: 604800000 # Replace with your desired refresh expiration time in milliseconds
redisRefreshKeyPrefix: "Refresh-token:" # Replace with your desired Redis refresh key prefix
kakao-api:
api-key: ${API-KEY}
base-url: ${BASE-URL}
iamport:
apikey: ${IAMPORT_API_KEY}
secretkey: ${IAMPORT_SECRET_KEY}
fcm:
request-url: "<https://fcm.googleapis.com/v1/projects/scbj-af2e3/messages:send>"
credential-path: "/credential/fcm-service-key.json"
scope : "<https://www.googleapis.com/auth/cloud-platform>"
LOCAL_MYSQL_USERNAME = root
LOCAL_MYSQL_PASSWORD = rootroot
LOCAL_MYSQL_PORT = 3306
EMAIL_SERVICE_USERNAME = [email protected]
EMAIL_SERVICE_PASSWORD = pyygzzsfwlfasiqq
API-KEY = 63451179ad9b99ad15505e119f614dbd
SERVER-URL = <https://3.34.147.187.nip.io>
SCHEDULE-CRON = p.*,
r.*,
h.*,
ph.*,
p.created_at AS product_created_at,
r.created_at AS reservation_created_at,
h.created_at AS hotel_created_at,
ph.created_at AS payment_history_created_at
ENV 파일
FCM KEY
해당 위치와 이름을 사용해주세요.
fcm-service-key.json
{
"type": "service_account",
"project_id": "scbj-af2e3",
"private_key_id": "7b68355b1390cccdc74f3fe10d97a81e5c0f7ec0",
"private_key": "-----BEGIN PRIVATE KEY-----\\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQClm9CHQrHbIVzb\\ntoQG3YpQBKs8MiAgGYSQQ/o3inUr1N5oVXfVLLBOp9HY+uZeq7qBfGW6LxwtVK0J\\n62zjHJSGFu/XEKdSqyte78B/sLMhvpHR7S6nfIbjduN1x+aad4tddYDSc5Mp0S+6\\n6okjVSKx9EdPbiASC4yPuIzFol4zqVOyS4zouQEANVApdVpDaFX/PCNh9Y/BHSLO\\niQlUGkxKTG9wcFU+aJgGhgpUdGvHJm+UhXhTAyHMTcVx5UkO+dqxLr6McGzk4jQT\\niJCUMtIPc6SFKc8LEz2UgRrmlF0o8hDHSWHMWszkMhgQDAtz8eyUebcIVOI1bjvW\\nrXJqMS81AgMBAAECggEACB9Le6rNeswY2AzMTmLksvZ7qHzj3vcpbYLr/Xfctczf\\nqJnSggHKVt07uUra7Bc7kzi064v+c4m03+jsQvpGnYn38uIV9sO+4Y3cMNcLfhLw\\n520czemZWwQcdU0b1gUZcHjAG/I/rDwefWod1j4JcNVkfvSNfZ0T5IOeYd4MBTgL\\nOOe8kwKYBWx7BcScRMjwBmZiclej0f9++hGiLPfsh2qzyR0GM2jge+Ow3hNlZSCO\\nJoS2+Oew3c7ODQVsOPkUCAJ41WycSHCc5rMUFjESBqP9cJzNEmvyrwX9X1QZKF8S\\nS0yoJd1uVOB1EERJ8qlI19o2hVDth0QVdefYXEOjAQKBgQDl/ic2L0pgFZfjTjQU\\nSSY8JJVQTOG5VnDoR7HYfW6grY48rd9avUJ67WyJ/h7trpjyNsQgOmkPLNmiltAJ\\nDJbhOoU5uMMJSqk34YwZrCtazzD0pfa509sztXcdGbdNAncgSDAy8BjK7BXHHq5I\\nDoL5fv8Y9+xf3rQAsJO9gPXnAQKBgQC4Vd10wDp6ckVNTA/e00Z6Ce2pT2kqIgLT\\nM59R7E5n6BGrndhV7DS3lrnoDdXxYXO45S7WWCVUtWwQO442Pbz+Rmqw8FByRegJ\\nz0R2Aj1of/Sgz4zJ5K9Rp2SYpS69j36Hu7t28AsdzPWsTFAlkCUEtuVK5GNsmZ7f\\n75Qo/ERcNQKBgAzfUKqDsxH1o26hbeDEx1MOaRz5cJjC8cbOXHHVc1+i1xcmVB3s\\nAdCHgU+n3WtIHl9QGWIEYuTqibPD5Rjcj4VDlTlJ0gCvIRFzmjfFnxeSCRdoQorc\\nBKS8P1Jtogi5Xpl78NapAXo6BG4ElZSK22HDbduj5KLpAAIZ3+r3UMwBAoGAX/9H\\nj0+0pKPx92lPMonwwAl/nZbfe7OuqPLPW8impHI1EZzoVwbmBV4XfwQFkOlhbL7d\\n/350IoNAvctmKlVIoVtmoLLmEjzZtJIeYx6TgGJysXSlK1dO/kUgnGYZy1p5WJKp\\n9CzafTCKGKq9anKA9M2S58e9B4eRN6n7DMUjjKkCgYAfs70hcBXM7W0Cr/CcvCi2\\n3vj/Wn1pPFq9RGqEmOaYjYoM6gHji/sEXhRppUFPNgxKYN+bV1tpVrRTYko+69gz\\njDUsHdCfnmnxZ5gjOaeMuwt8fx4MX5KWbV14HDFNAfD9MorwYbNHPxBTZTNNTHvH\\n7H5Ne2TMb5j11OgeAB94vQ==\\n-----END PRIVATE KEY-----\\n",
"client_email": "[email protected]",
"client_id": "113674871363518534251",
"auth_uri": "<https://accounts.google.com/o/oauth2/auth>",
"token_uri": "<https://oauth2.googleapis.com/token>",
"auth_provider_x509_cert_url": "<https://www.googleapis.com/oauth2/v1/certs>",
"client_x509_cert_url": "<https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-ggiw3%40scbj-af2e3.iam.gserviceaccount.com>",
"universe_domain": "googleapis.com"
}
노출되면 안되니 조심해주세요!