26 lines
586 B
Java
26 lines
586 B
Java
|
package com.iot.modbus_rtcp.config;
|
||
|
|
||
|
import lombok.Data;
|
||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||
|
import org.springframework.context.annotation.Configuration;
|
||
|
|
||
|
import java.util.HashSet;
|
||
|
import java.util.Map;
|
||
|
|
||
|
@Configuration
|
||
|
@Data
|
||
|
@ConfigurationProperties(prefix = "server.netty")
|
||
|
public class EquipmentIPProperties {
|
||
|
|
||
|
private Map<String, String> identifiers;
|
||
|
|
||
|
public HashSet<String> keys() {
|
||
|
return new HashSet<>(this.identifiers.keySet());
|
||
|
}
|
||
|
|
||
|
public String get(String key) {
|
||
|
return this.identifiers.get(key);
|
||
|
}
|
||
|
|
||
|
}
|