package com.whyc;
|
|
import com.whyc.service.BattTestDataInfService;
|
import com.whyc.service.BattTestDataStopService;
|
import com.whyc.service.ClearTableService;
|
import com.whyc.util.SpringUtil;
|
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.context.ApplicationContext;
|
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
|
import static java.lang.Thread.sleep;
|
|
/**
|
* @Description : 启动类
|
* @date 2020/10/15
|
**/
|
@SpringBootApplication
|
@EnableWebMvc
|
@ServletComponentScan(basePackages = {"com.whyc.filter","com.whyc.servlet"})
|
@EnableCaching
|
public class Application extends WebMvcConfigurerAdapter implements WebMvcConfigurer {
|
|
public static void main(String[] args) {
|
SpringApplication.run(Application.class,args);
|
ApplicationContext applicationContext = SpringUtil.getApplicationContext();
|
//BattTestDataStopService service = (BattTestDataStopService) applicationContext.getBean("battTestDataStopService");
|
//BattTestDataInfService service = (BattTestDataInfService) applicationContext.getBean("battTestDataInfService");
|
//service.transferToDB2();
|
//service.updateField();
|
//service.createNewDB();
|
//service.transferToDB2();
|
//service.correctRecordNum();
|
int sleepSeconds = 3;
|
System.out.println("清除/删除操作完成,"+sleepSeconds+"秒后自动退出程序...");
|
try {
|
sleep(sleepSeconds*1000);
|
} catch (InterruptedException e) {
|
e.printStackTrace();
|
}
|
System.out.println("程序终止");
|
System.exit(1);
|
}
|
|
}
|