mirror of https://github.com/usbharu/Hideout.git
fix: 設定ファイルが読み込まれていなかったのを修正
This commit is contained in:
parent
e77c28c6c2
commit
527750b3a6
|
@ -1,5 +1,10 @@
|
|||
package dev.usbharu.hideout
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import dev.usbharu.hideout.config.Config
|
||||
import dev.usbharu.hideout.config.ConfigData
|
||||
import dev.usbharu.hideout.plugins.*
|
||||
import dev.usbharu.hideout.repository.IUserAuthRepository
|
||||
import dev.usbharu.hideout.repository.IUserRepository
|
||||
|
@ -28,6 +33,13 @@ val Application.property: Application.(propertyName: String) -> String
|
|||
@Suppress("unused") // application.conf references the main function. This annotation prevents the IDE from marking it as unused.
|
||||
fun Application.module() {
|
||||
|
||||
Config.configData = ConfigData(
|
||||
url = property("hideout.url"),
|
||||
objectMapper = jacksonObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
||||
)
|
||||
|
||||
val module = org.koin.dsl.module {
|
||||
single<Database> {
|
||||
Database.connect(
|
||||
|
|
|
@ -11,8 +11,8 @@ ktor {
|
|||
}
|
||||
|
||||
hideout {
|
||||
hostname = "https://localhost:8080"
|
||||
hostname = ${?HOSTNAME}
|
||||
url = "http://localhost:8080"
|
||||
|
||||
database {
|
||||
url = "jdbc:h2:./test;MODE=POSTGRESQL"
|
||||
driver = "org.h2.Driver"
|
||||
|
|
Loading…
Reference in New Issue