package com.zt.plat.module.qms.iot.tcpserver.cluster;

import org.springframework.stereotype.Component;

import java.util.UUID;

@Component
public class InstanceIdProvider {

    private final String instanceId;

    public InstanceIdProvider() {
        //使用随机 UUID（每次重启会变）
        this.instanceId = UUID.randomUUID().toString();
    }

    public String getInstanceId() {
        return instanceId;
    }
}
