package com.yh.saas;

import com.winsea.svc.common.annotation.EnableService;
import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@EnableTransactionManagement
@EnableScheduling // 开始定时任务
@EnableService
@ComponentScan(value = {
        "com.yh.saas",
        "com.winsea.svc"})
public class PlatformApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        //发送邮件传输附件用
        System.setProperty("mail.mime.splitlongparameters", "false");
        SpringApplication.run(PlatformApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        System.setProperty("mail.mime.splitlongparameters", "false");
        return application.sources(PlatformApplication.class);
    }
}
