@Configuration
@ConfigurationProperties(prefix = "rocketmq")
@Data
public class MqConfig {
private Boolean isOpen;
private String accessKey;
private String secretKey;
private String nameSrvAddr;
private String consumeThreadNums;
private String topic;
private String groupId;
private String tag;
private String delayTopic;
private String delayGroupId;
private String delayTag;
private String formTopic;
private String formTag;
private String answerTopic;
private String answerTag;
private String logGroupId;
private String logTopic;
private String logTag;
private String syncGroupId;
private String syncFormTopic;
private String syncAnswerTopic;
private String syncTag;
public Properties getMqPropertie() {
Properties properties = new Properties();
properties.setProperty(PropertyKeyConst.AccessKey, this.accessKey);
properties.setProperty(PropertyKeyConst.SecretKey, this.secretKey);
properties.setProperty(PropertyKeyConst.NAMESRV_ADDR, this.nameSrvAddr);
return properties;
}
}
配置文件
|