package com.ssyf;


import com.ssyf.common.core.constants.SystemConstants;
import lombok.extern.slf4j.Slf4j;
import org.dromara.x.file.storage.spring.EnableFileStorage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 
 * @author huwei 
 * @date 2023/8/1 16:38
 */
@Slf4j
@EnableFileStorage
@EnableCaching
@EnableAsync
@EnableScheduling
@EnableTransactionManagement
@EnableFeignClients(basePackages = SystemConstants.PROJECT_BASE_PACKAGE)
@EnableDiscoveryClient
@EnableAspectJAutoProxy(proxyTargetClass = true ,exposeProxy = true)
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class , HibernateJpaAutoConfiguration.class} ,scanBasePackages = SystemConstants.PROJECT_BASE_PACKAGE)
public class BaseApplicationStarter {

    public static void main(String[] args) {
        System.err.println("temp dir: " + System.getProperty("java.io.tmpdir"));
        log.info("【{}】系统启动中", BaseApplicationStarter.class.getName());
        SpringApplication.run(BaseApplicationStarter.class, args);
        log.info("【{}】系统启动成功...", BaseApplicationStarter.class.getName());
    }
}
