From 8a0aff4729ca4257c561859289e95bed70029725 Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Fri, 22 Nov 2024 12:36:50 +0100 Subject: [PATCH] add JwtProperty --- src/main/kotlin/ltd/hlaeja/Application.kt | 3 +++ src/main/kotlin/ltd/hlaeja/property/JwtProperty.kt | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/main/kotlin/ltd/hlaeja/property/JwtProperty.kt diff --git a/src/main/kotlin/ltd/hlaeja/Application.kt b/src/main/kotlin/ltd/hlaeja/Application.kt index 42eea90..88bd076 100644 --- a/src/main/kotlin/ltd/hlaeja/Application.kt +++ b/src/main/kotlin/ltd/hlaeja/Application.kt @@ -1,8 +1,11 @@ package ltd.hlaeja +import ltd.hlaeja.property.JwtProperty import org.springframework.boot.autoconfigure.SpringBootApplication +import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.boot.runApplication +@EnableConfigurationProperties(JwtProperty::class) @SpringBootApplication class Application diff --git a/src/main/kotlin/ltd/hlaeja/property/JwtProperty.kt b/src/main/kotlin/ltd/hlaeja/property/JwtProperty.kt new file mode 100644 index 0000000..7a40a32 --- /dev/null +++ b/src/main/kotlin/ltd/hlaeja/property/JwtProperty.kt @@ -0,0 +1,8 @@ +package ltd.hlaeja.property + +import org.springframework.boot.context.properties.ConfigurationProperties + +@ConfigurationProperties(prefix = "jwt") +data class JwtProperty( + val privateKey: String, +)