package kr.gmtc.gw.elastic;

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 ESApplication {

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

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

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

                SpringApplication springApplication = new SpringApplication(ESApplication.class);

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

	}

}
