我有一组属性如下:
spring.kafka.producer.edwh.bootstrap-servers=localhost:9092
spring.kafka.producer.edwh.properties.enable.idempotence=true
spring.kafka.producer.edwh.retries=10
spring.kafka.producer.edwh.transaction-id-prefix=slv
spring.kafka.producer.edwh.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer
spring.kafka.producer.edwh.properties.spring.json.add.type.headers=false
...我想通过使用以下方式映射到这样的类@ConfigurationProperties(prefix = "spring.kafka.producer.edwh")
:
@ConfigurationProperties(prefix = "spring.kafka.producer.edwh")
public class EdwhKafkaProducerConfig {
private String bootstrap_servers;
private String properties_enable_idempotence;
private int retries;
private String transaction_id_prefix;
private String value_serializer;
private boolean properties_spring_json_add_type_headers;
}
... 我能怎么做?