Skip to content

Instantly share code, notes, and snippets.

@mjedynak
Last active February 12, 2022 16:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjedynak/2002c0345ce873a64f6455cd77401d0c to your computer and use it in GitHub Desktop.
Save mjedynak/2002c0345ce873a64f6455cd77401d0c to your computer and use it in GitHub Desktop.
@Configuration
class AppConfig {
@Value(value = "\${kafka.bootstrapAddress}")
lateinit var bootstrapAddress: String
@Bean
fun adminClient(): AdminClient {
return AdminClient.create(mapOf(
AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG to bootstrapAddress)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment