ワンクリックで
kotlin-app-config
HOCON-basert konfigurasjon med PropertiesConfig singleton for Ktor batch-tjenester på NAIS (FSS)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
HOCON-basert konfigurasjon med PropertiesConfig singleton for Ktor batch-tjenester på NAIS (FSS)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Flyway-migrasjoner for PostgreSQL: navnekonvensjoner (V{n}__desc.sql), skjema for krav/feilmelding/filvalideringsfeil, DBListener-testing med TestContainers
Post-send livssyklus: StatusService poller /mottaksstatus; StoppKravService; RapportService + AvstemmingRouting-frontend for manuell reskontroføring
SlackService feilakkumulering og Tags-basert varsling for prosesseringsfeil i SKE-batch
Endring av eksisterende krav (endre rente og endre hovedstol): EndreKravService, request-DTOer, status-konformering og SKE API PUT-endepunkter
Kotest BehaviorSpec/MockK-mønstre for sokos-ske-krav: scenariostruktur, DBListener/SftpListener, MockHttpClient, circuit-breaker-reset og matchers
Idiomatic Kotlin: null safety, immutability, sealed types, structured concurrency, extension functions, DSL builders, Gradle Kotlin DSL
| name | kotlin-app-config |
| description | HOCON-basert konfigurasjon med PropertiesConfig singleton for Ktor batch-tjenester på NAIS (FSS) |
This skill describes the HOCON + PropertiesConfig singleton pattern used in this project.
Config is loaded from layered HOCON files via Ktor's ApplicationConfig API.
PropertiesConfig is a Kotlin object that holds all typed config sections as lazy properties.
Call PropertiesConfig.load(config) once at startup; never re-initialize.
object PropertiesConfig {
lateinit var config: ApplicationConfig
private set
val isLocal: Boolean
get() = applicationProperties.isLocal
val applicationProperties by lazy {
config.property("application").getAs<ApplicationProperties>()
}
val postgresConfig by lazy {
config.property("postgres").getAs<PostgresConfig>()
}
val sftpProperties by lazy {
config.property("sftp").getAs<SftpProperties>()
}
val maskinportenClientProperties by lazy {
config.property("maskinportenClient").getAs<MaskinportenClientConfig>()
}
val circuitBreakerConfig by lazy {
config.property("circuitBreaker").getAs<CircuitBreakerConfig>()
}
val timerConfig by lazy {
config.property("timer").getAs<TimerConfig>()
}
fun load(applicationConfig: ApplicationConfig) {
if (!::config.isInitialized) {
config = applicationConfig
}
}
}
private fun Application.module() {
PropertiesConfig.load(environment.config.mergeWithEnv())
val useAuthentication = PropertiesConfig.applicationProperties.useAuthentication
if (!PropertiesConfig.isLocal) {
PostgresDataSource.migrate()
}
if (!timerConfig.useTimer) return
launchJob(skeService::handleNewKrav, timerConfig.schedulerIntervalPeriod)
}
mergeWithEnv()) and example HOCON config files.@Serializable) and testing configuration with MockK.@Serializable data class properties with compile-time field names