package com.bocloud.ims.booter;

import com.spring4all.swagger.EnableSwagger2Doc;
import net.javacrumbs.shedlock.spring.annotation.EnableSchedulerLock;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication(exclude = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})
@EnableRabbit
@EnableScheduling
@EnableSwagger2Doc
/* 开启定时任务锁，默认设置锁最大占用时间为30s*/
@EnableSchedulerLock(defaultLockAtMostFor = "PT30S")
@ComponentScan(value = {"com.bocloud"})
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
