-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from grida-diary/main
prod
- Loading branch information
Showing
57 changed files
with
252 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
grida-clients/kakao-client/src/main/resources/application-kakao-client.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: dev | ||
kakao: | ||
appKey: ${KAKAO_APP_KEY} | ||
base-uri: http://localhost:8080 | ||
api-path: ${KAKAO_REDIRECT_URL} | ||
|
||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: prod | ||
kakao: | ||
appKey: ${KAKAO_APP_KEY} | ||
base-uri: https://grida.today | ||
api-path: ${KAKAO_REDIRECT_URL} |
14 changes: 14 additions & 0 deletions
14
grida-clients/openai-client/src/main/resources/application-openai-client.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
openai: | ||
secret-key: ${OPEN_AI_SECRET_KEY} | ||
|
||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: dev | ||
|
||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: prod |
2 changes: 0 additions & 2 deletions
2
grida-clients/openai-client/src/main/resources/application.yml
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
grida-clients/s3-client/src/main/resources/application-s3-client.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
storage: | ||
aws: | ||
access-key: ${S3_ACCESS_KEY} | ||
secret-key: ${S3_SECRET_KEY} | ||
region: ${S3_REGION} | ||
bucket: ${S3_BUCKET} | ||
host: ${CDN_HOST} | ||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: dev | ||
|
||
--- | ||
spring: | ||
config: | ||
activate: | ||
on-profile: prod |
7 changes: 0 additions & 7 deletions
7
grida-clients/storage-client/src/main/resources/application-storage-client.yml
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
grida-common/src/main/kotlin/org/grida/api/dto/ListResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.grida.api.dto | ||
|
||
data class ListResponse<T>( | ||
val count: Int, | ||
val list: List<T> | ||
) { | ||
|
||
companion object { | ||
fun <T> from( | ||
list: List<T>, | ||
mapAction: () -> T | ||
): ListResponse<T> { | ||
return ListResponse( | ||
list.size, | ||
list.map { mapAction.invoke() } | ||
) | ||
} | ||
} | ||
} |
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 1 addition & 20 deletions
21
grida-core/core-api/src/main/kotlin/org/grida/config/CoreApiConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,8 @@ | ||
package org.grida.config | ||
|
||
import io.wwan13.springrequestlogger.configure.EnableLoggingRequest | ||
import io.wwan13.springrequestlogger.configure.LogMessageConfigurer | ||
import io.wwan13.springrequestlogger.context.RequestContext | ||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan | ||
import org.springframework.context.annotation.Configuration | ||
import java.util.function.Function | ||
|
||
@Configuration | ||
@ConfigurationPropertiesScan | ||
@EnableLoggingRequest | ||
class CoreApiConfig : LogMessageConfigurer { | ||
|
||
override fun format(): Function<RequestContext, String> { | ||
return Function { context -> | ||
""" | ||
| | ||
| ${context.method} '${context.uri}' - ${context.status} (${context.elapsed} s) | ||
| >> Request Headers : ${context.requestHeaders} | ||
| >> Request Params : ${context.requestParams} | ||
| >> Request Body : ${context.requestBody} | ||
| >> Response Body : ${context.responseBody} | ||
""".trimMargin() | ||
} | ||
} | ||
} | ||
class CoreApiConfig |
14 changes: 14 additions & 0 deletions
14
grida-core/core-api/src/main/kotlin/org/grida/config/RequestLoggingConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.grida.config | ||
|
||
import io.wwan13.springrequestlogger.configure.EnableLoggingRequest | ||
import io.wwan13.springrequestlogger.configure.LogMessageConfigurer | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
@EnableLoggingRequest | ||
class RequestLoggingConfig : LogMessageConfigurer { | ||
|
||
override fun excludePathPatterns(): List<String> { | ||
return listOf("/api/actuator/**") | ||
} | ||
} |
12 changes: 0 additions & 12 deletions
12
grida-core/core-api/src/main/kotlin/org/grida/error/CoreApiErrorType.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,24 @@ | ||
spring: | ||
profiles: | ||
active: dev | ||
include: | ||
- rds-storage | ||
- kakao-client | ||
- openai-client | ||
- s3-client | ||
- logging | ||
- monitoring | ||
mvc: | ||
throw-exception-if-no-handler-found: true | ||
web: | ||
resources: | ||
add-mappings: false | ||
datasource: | ||
url: ${DATASOURCE_URL} | ||
username: ${DATABASE_USERNAME} | ||
password: ${DATABASE_PASSWORD} | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
jpa: | ||
hibernate: | ||
ddl-auto: update | ||
properties: | ||
hibernate: | ||
format_sql: false | ||
show_sql: false | ||
default_batch_fetch_size: 1000 | ||
open-in-view: false | ||
servlet: | ||
multipart: | ||
max-file-size: 100MB | ||
max-request-size: 100MB | ||
servlet: | ||
multipart: | ||
max-file-size: 100MB | ||
max-request-size: 100MB | ||
|
||
jwt: | ||
secret-key: ${JWT_SECRET_KEY} | ||
access-token-expired: ${ACCESS_TOKEN_EXPIRED} | ||
refresh-token-expired: ${REFRESH_TOKEN_EXPIRED} | ||
|
||
openai: | ||
secret-key: ${OPEN_AI_SECRET_KEY} | ||
|
||
storage: | ||
aws: | ||
access-key: ${S3_ACCESS_KEY} | ||
secret-key: ${S3_SECRET_KEY} | ||
region: ${S3_REGION} | ||
bucket: ${S3_BUCKET} | ||
host: ${CDN_HOST} | ||
|
||
kakao: | ||
appKey: ${KAKAO_APP_KEY} | ||
redirectUri: ${KAKAO_REDIRECT_URL} | ||
|
||
management: | ||
endpoints: | ||
web: | ||
base-path: /api/actuator | ||
exposure: | ||
include: "prometheus" | ||
|
||
server: | ||
tomcat: | ||
mbeanregistry: | ||
enabled: true | ||
|
||
logging: | ||
level: | ||
root: INFO | ||
refresh-token-expired: ${REFRESH_TOKEN_EXPIRED} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 8 additions & 2 deletions
10
grida-core/core-domain/src/main/kotlin/org/grida/domain/diary/DiaryScope.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
package org.grida.domain.diary | ||
|
||
enum class DiaryScope { | ||
PUBLIC, FRIENDS_ONLY, PRIVATE | ||
import org.grida.domain.base.ValueEnum | ||
|
||
enum class DiaryScope( | ||
override val value: String | ||
) : ValueEnum<DiaryScope> { | ||
PUBLIC("공개"), | ||
FRIENDS_ONLY("친구 공개"), | ||
PRIVATE("비공개"); | ||
} |
9 changes: 7 additions & 2 deletions
9
grida-core/core-domain/src/main/kotlin/org/grida/domain/image/ImageStatus.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
package org.grida.domain.image | ||
|
||
enum class ImageStatus { | ||
ACTIVATE, DEACTIVATE | ||
import org.grida.domain.base.ValueEnum | ||
|
||
enum class ImageStatus( | ||
override val value: String | ||
) : ValueEnum<ImageStatus> { | ||
ACTIVATE("활성화"), | ||
DEACTIVATE("비활성화"); | ||
} |
Oops, something went wrong.