content: package cn.abel.queue.config;
  
  import com.aliyun.openservices.ons.api.PropertyKeyConst;
  import org.springframework.boot.context.properties.ConfigurationProperties;
  import org.springframework.stereotype.Component;
  
  import java.util.Properties;
  
  /**
   * @author yyb
   * @time 2020/3/25
   */
  @Component
  @ConfigurationProperties(prefix = "ali.rocket.mq")
  public class ALiMqConfig {
      private String accessKey;
      private String secretKey;
      private String nameSrvAddr;
      private String testTopic;
      private String testGroupId;
      private String testTag;
  
      public Properties getMqProperties() {
          Properties properties = new Properties();
          properties.setProperty(PropertyKeyConst.AccessKey, this.accessKey);
          properties.setProperty(PropertyKeyConst.SecretKey, this.secretKey);
          properties.setProperty(PropertyKeyConst.GROUP_ID, testGroupId);
          properties.setProperty(PropertyKeyConst.NAMESRV_ADDR, this.nameSrvAddr);
          return properties;
      }
  
      public String getAccessKey() {
          return accessKey;
      }
  
      public void setAccessKey(String accessKey) {
          this.accessKey = accessKey;
      }
  
      public String getSecretKey() {
          return secretKey;
      }
  
      public void setSecretKey(String secretKey) {
          this.secretKey = secretKey;
      }
  
      public String getNameSrvAddr() {
          return nameSrvAddr;
      }
  
      public void setNameSrvAddr(String nameSrvAddr) {
          this.nameSrvAddr = nameSrvAddr;
      }
  
      public String getTestTopic() {
          return testTopic;
      }
  
      public void setTestTopic(String testTopic) {
          this.testTopic = testTopic;
      }
  
      public String getTestGroupId() {
          return testGroupId;
      }
  
      public void setTestGroupId(String testGroupId) {
          this.testGroupId = testGroupId;
      }
  
      public String getTestTag() {
          return testTag;
      }
  
      public void setTestTag(String testTag) {
          this.testTag = testTag;
      }
  }
  