jean
08/03/2021, 8:41 AMapplication.conf
, I declared the following :
ktor {
deployment {
port = 8080
port = ${?PORT}
}
application {
modules = [ ... ]
}
jwt {
secret = "secret"
issuer = "<http://0.0.0.0:8080/>"
audience = "<http://0.0.0.0:8080/login>"
realm = "Access to 'login'"
}
pbkdf2 {
salt = "salt"
iterations = "10000"
keyLength = "512"
}
}
when I use environment.config.property("jwt.secret").getString()
from Application.kt
I receive this error
Caused by: io.ktor.config.ApplicationConfigurationException: Property jwt.secret not found.What am I doing wrong here?
duuusha
08/03/2021, 8:57 AMjwt
group outside the ktor
group:
ktor {
deployment {
port = 8080
port = ${?PORT}
}
application {
modules = [ ... ]
}
pbkdf2 {
salt = "salt"
iterations = "10000"
keyLength = "512"
}
}
jwt {
secret = "secret"
issuer = "<http://0.0.0.0:8080/>"
audience = "<http://0.0.0.0:8080/login>"
realm = "Access to 'login'"
}
jean
08/03/2021, 9:16 AM