From de937b75fc5736f085ae924fcfae9766d05d8723 Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Mon, 25 Nov 2024 00:44:05 +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..7d534d8 --- /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 publicKey: String, +)