package com.yuchen.saas.park.service;

import com.yuchen.saas.park.service.service.door.config.DoorAccessControlConfigIssueTaskScheduleService;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import lombok.val;
import org.nest.springwrap.core.cloud.feign.EnableNestFeign;
import org.nest.springwrap.core.launch.NestApplication;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableAdminServer
@EnableNestFeign
@SpringCloudApplication
@EnableScheduling
@EnableAsync
@ComponentScan({"com.yuchen", "com.thinkunion"})
public class ParkApplication {
    public static void main(String[] args) {
        val applicationContext = NestApplication.run(AppNameConstant.SAAS_PARK, ParkApplication.class, args);
        applicationContext.getBean(DoorAccessControlConfigIssueTaskScheduleService.class).scheduleTriggerAndHandleTask();
    }
}
