package com.ruoyi;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.ApplicationPidFileWriter;

import java.io.File;
import java.util.Properties;

/**
 * 启动程序
 *
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@Slf4j
public class RuoYiApplication
{
    public static void main(String[] args)
    {
        Properties properties = System.getProperties();
        String rootPath = properties.getProperty("user.dir");
        SpringApplication application = new SpringApplication(RuoYiApplication.class);
        application.addListeners(new ApplicationPidFileWriter(rootPath + File.separator + "app.pid"));
        application.run(args);
        log.info("数据中心启动成功***********************");
    }
}
