package com.its.op.config;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Slf4j
@Getter
@Setter
@ToString
@Configuration
@ConfigurationProperties(prefix = "application.center-comm")
public class CenterCommConfig {

    private String  processId;
    private String bindingAddr = "";
    private int bindingPort = 4602;
    private boolean dump = false;
    private String notificationGroups = "";

    @PostConstruct
    private void init() {
        if (this.bindingAddr.equals("")) this.bindingAddr = "0.0.0.0";
        //log.info("{}", this);
    }
}
