/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
 *
 */
package net.northking.cctp.se;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * 脚本引擎启动类
 *
 * @author : xiusong.xie
 * @version : 1.0
 */
@SpringBootApplication
@ComponentScan(value = {"net.northking.cctp.se"})
@EnableScheduling
@EnableSwagger2
public class ScriptEngineApplication
{
  /**
   * 日志
   */
  private final static Logger logger = LoggerFactory.getLogger(ScriptEngineApplication.class);

  public static void main(String[] args)
  {
    logger.info("脚本引擎  启动----------开始 ...............");

    String pidFile = "script-engine.pid";
    SpringApplication application = new SpringApplication(ScriptEngineApplication.class);
    // 指定PID文件
    application.addListeners(new ApplicationPidFileWriter(pidFile));
    application.run(args);

    logger.info("脚本引擎 启动-----------结束 ...............");
  }
}
