Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c19c211839 | ||
|
|
aace535914 | ||
|
|
59982ef762 |
-2
@@ -1,7 +1,6 @@
|
|||||||
package de.twomartens.wahlrecht.configuration
|
package de.twomartens.wahlrecht.configuration
|
||||||
|
|
||||||
import de.twomartens.wahlrecht.property.ServiceProperties
|
import de.twomartens.wahlrecht.property.ServiceProperties
|
||||||
import org.springframework.cloud.context.config.annotation.RefreshScope
|
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
import java.time.Clock
|
import java.time.Clock
|
||||||
@@ -10,7 +9,6 @@ import java.time.Clock
|
|||||||
open class ClockConfiguration(private val serviceProperties: ServiceProperties) {
|
open class ClockConfiguration(private val serviceProperties: ServiceProperties) {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@RefreshScope
|
|
||||||
open fun clock(): Clock {
|
open fun clock(): Clock {
|
||||||
return Clock.system(serviceProperties.defaultTimeZone)
|
return Clock.system(serviceProperties.defaultTimeZone)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,7 @@ import java.time.ZoneId
|
|||||||
@RefreshScope
|
@RefreshScope
|
||||||
@ConfigurationProperties(prefix = "de.twomartens.wahlrecht")
|
@ConfigurationProperties(prefix = "de.twomartens.wahlrecht")
|
||||||
@Schema(description = "Properties, to configure this Application")
|
@Schema(description = "Properties, to configure this Application")
|
||||||
data class ServiceProperties(var defaultTimeZone: ZoneId, var greeting: String)
|
class ServiceProperties {
|
||||||
|
lateinit var defaultTimeZone: ZoneId
|
||||||
|
lateinit var greeting: String
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
de.twomartens.wahlrecht:
|
de.twomartens.wahlrecht:
|
||||||
greeting: "Moin %s, you are stage"
|
greeting: "Moin %s, you are sth"
|
||||||
|
|||||||
Reference in New Issue
Block a user