package cn.superdesk.uniorder.executor;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import javax.annotation.PostConstruct;
import java.util.TimeZone;

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2022/5/10 1:02 下午
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022/5/10 1:02 下午
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@SpringBootApplication
@EnableTransactionManagement
@MapperScan("cn.superdesk.uniorder.dao.mapper.*")
@ComponentScan(value = {
        "cn.superdesk.uniorder",
        "cn.superdesk.uniorder.service",
        "cn.superdesk.uniorder.executor.scheduler.kafka"
})
public class ExecutorInstanceApplication {

    public static void main(String[] args) {
        ApplicationContext ctx = SpringApplication.run(ExecutorInstanceApplication.class, args);
    }

    @PostConstruct
    void setDefaultTimezone() {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
    }
}
