package com.mvc;

import com.mvc.iot.aep.config.AepConfig;
import com.mvc.listener.ApplicationStartup;
import com.mvc.iot.onenet.config.OneNetConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.oas.annotations.EnableOpenApi;

/**
 * Hello world!
 *
 */
@MapperScan(value ="com.mvc")
@EnableOpenApi
@SpringBootApplication
@EnableScheduling
@EnableAsync        //开启定时任务异步执行的支持 2022-10-13 guozhao
@EnableAspectJAutoProxy // 关键注解
@EnableConfigurationProperties({OneNetConfig.class, AepConfig.class})
public class App
{
    public static void main( String[] args )
    {
        // SpringApplication.run(App.class, args);
        SpringApplication springApplication = new SpringApplication(App.class);
        springApplication.addListeners(new ApplicationStartup());
        springApplication.run(args);
    }
}
