From 68568b7da0252df789b62c8866aa835cb5fd4038 Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Fri, 15 Nov 2024 10:56:28 +0100 Subject: [PATCH] add device registry property --- src/main/kotlin/ltd/hlaeja/Application.kt | 6 +++++- .../kotlin/ltd/hlaeja/property/DeviceRegistryProperty.kt | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/main/kotlin/ltd/hlaeja/property/DeviceRegistryProperty.kt diff --git a/src/main/kotlin/ltd/hlaeja/Application.kt b/src/main/kotlin/ltd/hlaeja/Application.kt index 88bd076..2c6c4b1 100644 --- a/src/main/kotlin/ltd/hlaeja/Application.kt +++ b/src/main/kotlin/ltd/hlaeja/Application.kt @@ -1,11 +1,15 @@ package ltd.hlaeja +import ltd.hlaeja.property.DeviceRegistryProperty 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) +@EnableConfigurationProperties( + DeviceRegistryProperty::class, + JwtProperty::class, +) @SpringBootApplication class Application diff --git a/src/main/kotlin/ltd/hlaeja/property/DeviceRegistryProperty.kt b/src/main/kotlin/ltd/hlaeja/property/DeviceRegistryProperty.kt new file mode 100644 index 0000000..bee98ec --- /dev/null +++ b/src/main/kotlin/ltd/hlaeja/property/DeviceRegistryProperty.kt @@ -0,0 +1,8 @@ +package ltd.hlaeja.property + +import org.springframework.boot.context.properties.ConfigurationProperties + +@ConfigurationProperties(prefix = "device-registry") +data class DeviceRegistryProperty( + val url: String, +)