背景:将properties 配置的mq信息序列化对象进行链接
##properties配置文件mq链接信息
consumer.groupName=consumer_group
consumer.url=127.0.0.1:9411
consumer.user=root
consumer.pwd=1q2w3e4r
consumer.clusterName=sitech
consumer.tenantId=5
consumer.topic=billingMessage
package com.sitech.crmtpd.dto;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* @oauth: qiangSW
* @date: 2020/3/31 13:34
* @description: com.sitech.crmtpd.dto
* @doc:
*/
@Component
public class MqInfo {
public static String groupName;
public static String url;
public static String user;
public static String password;
public static String clusterName;
public static String tenantId;
public static String topic;
@Value("${consumer.groupName}")
public void setGroupName(String groupName) {
MqInfo.groupName =