Skip to content

Commit

Permalink
➕ Add cloud dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nowgnas committed Dec 11, 2023
1 parent 714f2ca commit 7514019
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 236 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ext {
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation "org.springframework.cloud:spring-cloud-starter-bus-kafka"
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
Expand Down
122 changes: 12 additions & 110 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -1,114 +1,16 @@

server:
port: 9000
spring:
application:
name: auth-service
config:
activate:
on-profile: dev
redis:
host: ${spring.redis.host}
port: ${spring.redis.port}
datasource:
url: ${spring.datasoure.url}
username: ${spring.datasource.username}
password: ${spring.datasoure.password}
jpa:
show-sql: true
hibernate:
ddl-auto: update
security:
oauth2:
client:
provider:
kakao:
authorization-uri: https://kauth.kakao.com/oauth/authorize
token-uri: https://kauth.kakao.com/oauth/token
user-info-uri: https://kapi.kakao.com/v2/user/me
user-name-attribute: id
registration:
kakao:
client-id: 5dca3ee52a5c5e81b0415473b05366f0
client-secret: RifFZkO0SBAISOUJn2XsGVRczr0h9qFj
client-authentication-method: client_secret_post
redirect-uri: ${oauth.redirect.domain}/login/oauth2/code/kakao
authorization-grant-type: authorization_code
client-name: kakao
scope:
- profile_nickname
- account_email
- phone_number



mail:
host: ${email.send.host}
port: 587
username: ${email.send.email}
password: ${email.send.passord}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
auth-code-expiration-millis: 1800000


feign:
client:
config:
default:
connectTimeout: 5000
readTimeout: 5000
loggerLevel: basic

email:
send:
from: ${email.send.from}


jwt:
access:
secret: ${jwt.access.secret}
lifetime: ${jwt.access.lifetime}
refresh:
secret: ${jwt.refresh.secret}
lifetime: ${jwt.refresh.lifetime}




cookie:
refresh:
http:
domain: ${cookie.refresh.http.domain}
token:
name: ${cookie.refresh.token.name}

system:
admin:
id: ${system.admin.id}
password: ${system.admin.password}


security:
authorization:
header:
name: Authorization

kakao:
login:
request:
uri: ${kakao.login.request.uri}
redirect:
uri: ${kakao.login.redirect.url}
logout:
redirect: ${kakao.logout.redirect}


service:
user:
domain: ${service.user.domain}

import: optional:configserver:http://config-service:8888
management:
endpoints:
web:
exposure:
include:
- "refresh"
- "bus-refresh"
17 changes: 16 additions & 1 deletion src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@

server:
port: 9000
spring:
application:
name: auth-service
config:
activate:
on-profile: local
import: optional:configserver:http://localhost:8888
management:
endpoints:
web:
exposure:
include:
- "refresh"
- "bus-refresh"

redis:
host: localhost
port: 6379
Expand Down
122 changes: 13 additions & 109 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -1,112 +1,16 @@

server:
port: 9000
spring:
application:
name: auth-service
config:
activate:
on-profile: dev
redis:
host: ${spring.redis.host}
port: ${spring.redis.port}
datasource:
url: ${spring.datasoure.url}
username: ${spring.datasource.username}
password: ${spring.datasoure.password}
jpa:
show-sql: true
hibernate:
ddl-auto: update
security:
oauth2:
client:
provider:
kakao:
authorization-uri: https://kauth.kakao.com/oauth/authorize
token-uri: https://kauth.kakao.com/oauth/token
user-info-uri: https://kapi.kakao.com/v2/user/me
user-name-attribute: id
registration:
kakao:
client-id: 5dca3ee52a5c5e81b0415473b05366f0
client-secret: RifFZkO0SBAISOUJn2XsGVRczr0h9qFj
client-authentication-method: client_secret_post
redirect-uri: ${oauth.redirect.domain}/login/oauth2/code/kakao
authorization-grant-type: authorization_code
client-name: kakao
scope:
- profile_nickname
- account_email
- phone_number


mail:
host: ${email.send.host}
port: 587
username: ${email.send.email}
password: ${email.send.passord}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
required: true
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
auth-code-expiration-millis: 1800000


feign:
client:
config:
default:
connectTimeout: 5000
readTimeout: 5000
loggerLevel: basic

email:
send:
from: ${email.send.from}


jwt:
access:
secret: ${jwt.access.secret}
lifetime: ${jwt.access.lifetime}
refresh:
secret: ${jwt.refresh.secret}
lifetime: ${jwt.refresh.lifetime}




cookie:
refresh:
http:
domain: ${cookie.refresh.http.domain}
token:
name: ${cookie.refresh.token.name}

system:
admin:
id: ${system.admin.id}
password: ${system.admin.password}


security:
authorization:
header:
name: Authorization

kakao:
login:
request:
uri: ${kakao.login.request.uri}
redirect:
uri: ${kakao.login.redirect.url}
logout:
redirect: ${kakao.logout.redirect}


service:
user:
domain: ${service.user.domain}
on-profile: prod
import: optional:configserver:http://config-service:8888
management:
endpoints:
web:
exposure:
include:
- "refresh"
- "bus-refresh"
16 changes: 0 additions & 16 deletions src/main/resources/application.yml

This file was deleted.

0 comments on commit 7514019

Please sign in to comment.