Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56c6fef178 | ||
|
|
46b1b32708 | ||
|
|
519101023c | ||
|
|
82b4f51390 | ||
|
|
3256939ac7 |
+2
@@ -1,6 +1,7 @@
|
||||
package de.twomartens.wahlrecht.configuration
|
||||
|
||||
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.Configuration
|
||||
import java.time.Clock
|
||||
@@ -9,6 +10,7 @@ import java.time.Clock
|
||||
open class ClockConfiguration(private val serviceProperties: ServiceProperties) {
|
||||
|
||||
@Bean
|
||||
@RefreshScope
|
||||
open fun clock(): Clock {
|
||||
return Clock.system(serviceProperties.defaultTimeZone)
|
||||
}
|
||||
|
||||
@@ -2,11 +2,10 @@ package de.twomartens.wahlrecht.property
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.bind.ConstructorBinding
|
||||
import org.springframework.cloud.context.config.annotation.RefreshScope
|
||||
import java.time.ZoneId
|
||||
|
||||
@RefreshScope
|
||||
@ConfigurationProperties(prefix = "de.twomartens.wahlrecht")
|
||||
@Schema(description = "Properties, to configure this Application")
|
||||
data class ServiceProperties @ConstructorBinding constructor(val defaultTimeZone: ZoneId, val greeting: String)
|
||||
data class ServiceProperties(var defaultTimeZone: ZoneId, var greeting: String)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
spring:
|
||||
config:
|
||||
import:
|
||||
- "classpath:config/wahlrecht.yaml"
|
||||
- "optional:configserver:http://configserver:8888/config"
|
||||
- "configserver:http://configserver:8888/config"
|
||||
kafka:
|
||||
bootstrap-servers:
|
||||
- kafka:9092
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
de.twomartens.wahlrecht:
|
||||
greeting: "Moin %s, you are prod"
|
||||
greeting: "Moin %s, you are stage"
|
||||
|
||||
Reference in New Issue
Block a user