Created
July 23, 2020 09:50
-
-
Save steklopod/f1c686872ca02ffaceca06a8435b183c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
@Validated | |
@ConfigurationProperties("registration.kafka") | |
public class KafkaProperties { | |
@NotEmpty(message = "Parameter 'bootstrap-servers' can not be empty") | |
private String bootstrapServers; | |
@NestedConfigurationProperty | |
@NotNull(message = "Parameter 'some-activate' can not be null") | |
private KafkaConsumerProperties someActivate; | |
} | |
@Data | |
public class KafkaConsumerProperties { | |
@NotEmpty(message = "Parameter 'topic' can not be empty") | |
private String topic; | |
@NotEmpty(message = "Parameter 'group-id' can not be empty") | |
private String groupId; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment