package com.tsi.api.server.config;

import com.tsi.api.server.util.ApiUtils;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Slf4j
@Data
@Configuration
@ConfigurationProperties(prefix = "application")
public class TsiApiServerConfig {

    private String name = "tsi-api-server";
    private String bootingTime;

    @PostConstruct
    private void init() {
        this.bootingTime = ApiUtils.now();

        log.info("[{}] ------------", this.getClass().getSimpleName());
        log.info("[{}] name: {}", this.getClass().getSimpleName(), this.name);
    }

}
