package kr.gmtc.gw.standstatus;

import java.time.ZoneId;
import java.util.TimeZone;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.boot.system.ApplicationHome;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@SpringBootApplication
public class StandStatusApplication {
	public static void main(String[] args) {
		 ApplicationHome home = new ApplicationHome(StandStatusApplication.class);
        String root = home.getDir().getPath();

        System.setProperty("user.dir", root);

        TimeZone.setDefault(TimeZone.getTimeZone(ZoneId.of("UTC")));

        Thread.currentThread().setName("JVM - Main");

        SpringApplication springApplication = new SpringApplication(StandStatusApplication.class);

        springApplication.addListeners(new ApplicationPidFileWriter("./application.pid"));
        springApplication.run(args);

	}
}
