Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
323337ed64 | ||
|
|
b04d6f4389 |
-20
@@ -1,20 +0,0 @@
|
|||||||
package de.twomartens.wahlrecht.configuration
|
|
||||||
|
|
||||||
import org.apache.kafka.clients.admin.AdminClientConfig
|
|
||||||
import org.springframework.beans.factory.annotation.Value
|
|
||||||
import org.springframework.context.annotation.Bean
|
|
||||||
import org.springframework.context.annotation.Configuration
|
|
||||||
import org.springframework.kafka.core.KafkaAdmin
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
open class KafkaConfiguration {
|
|
||||||
@Value(value = "\${spring.kafka.bootstrap-servers[0]}")
|
|
||||||
private val bootstrapServers: List<String> = mutableListOf()
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
open fun kafkaAdmin(): KafkaAdmin {
|
|
||||||
val configs: MutableMap<String, Any?> = HashMap()
|
|
||||||
configs[AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG] = bootstrapServers.first()
|
|
||||||
return KafkaAdmin(configs)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,3 @@
|
|||||||
server.port: 12000
|
|
||||||
management.server.port: 12001
|
|
||||||
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
config:
|
config:
|
||||||
import:
|
import:
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ spring:
|
|||||||
- "configserver:${CONFIGSERVER_SCHEME:http}://${CONFIGSERVER_HOST:configserver}:${CONFIGSERVER_PORT:8888}${CONFIGSERVER_PREFIX:/config}"
|
- "configserver:${CONFIGSERVER_SCHEME:http}://${CONFIGSERVER_HOST:configserver}:${CONFIGSERVER_PORT:8888}${CONFIGSERVER_PREFIX:/config}"
|
||||||
kafka:
|
kafka:
|
||||||
bootstrap-servers:
|
bootstrap-servers:
|
||||||
- ${KAFKA_HOST:kafka}:${KAFKA_PORT:9092}
|
- "${KAFKA_HOST:kafka}:${KAFKA_PORT:9092}"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
server:
|
server:
|
||||||
port: 12000
|
port: ${PORT:12000}
|
||||||
shutdown: graceful
|
shutdown: graceful
|
||||||
forward-headers-strategy: framework
|
forward-headers-strategy: framework
|
||||||
|
|
||||||
### technical configurations ###
|
### technical configurations ###
|
||||||
management:
|
management:
|
||||||
# for security, don't use same port as application
|
# for security, don't use same port as application
|
||||||
server.port: 12001
|
server.port: ${ACTUATOR_PORT:12001}
|
||||||
health:
|
health:
|
||||||
livenessState.enabled: true
|
livenessState.enabled: true
|
||||||
readinessState.enabled: true
|
readinessState.enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user