[#28] 쿠버네티스 환경 배포 #29

Merged
pricelees merged 25 commits from infra/#28 into main 2025-08-04 05:59:38 +00:00
2 changed files with 18 additions and 0 deletions
Showing only changes of commit d2e2c9c888 - Show all commits

View File

@ -39,6 +39,7 @@ dependencies {
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9")
// DB
implementation("com.github.f4b6a3:tsid-creator:5.2.6")
runtimeOnly("com.h2database:h2")
runtimeOnly("com.mysql:mysql-connector-j")

View File

@ -0,0 +1,17 @@
package roomescape.common.config
import com.github.f4b6a3.tsid.TsidFactory
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
@Configuration
class TsidConfig {
@Value("\${POD_NAME:app-0}")
private lateinit var podName: String
@Bean
fun tsidFactory(): TsidFactory = TsidFactory(podName.substringAfterLast("-").toInt())
}
fun TsidFactory.next(): Long = this.create().toLong()