Newer
Older
casic-goods-reptile / casic-web / src / main / java / com / casic / missiles / CasicApplication.java
lwh on 29 May 2022 1 KB feat:
package com.casic.missiles;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.io.IOException;

/**
 * SpringBoot方式启动类
 *
 * @author lwh
 * @Date 2021/06/06 12:06
 */
@SpringBootApplication
@EnableCaching
@EnableScheduling
@EnableTransactionManagement(proxyTargetClass = true)
@EnableAsync
@ServletComponentScan
@Slf4j
public class CasicApplication {
    public static void main(String[] args) {
        SpringApplication.run(CasicApplication.class, args);
        log.info("CasicApplication is success!");
        try {
            String url = "http://localhost:8081/reptile/";
            Runtime runtime = Runtime.getRuntime();
            runtime.exec("rundll32 url.dll,FileProtocolHandler " + url);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

}