| | |
| | | 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 |
| | |
| | | ApplicationContext applicationContext = SpringUtil.getApplicationContext(); |
| | | ClearTableService service = (ClearTableService) applicationContext.getBean("clearTableService"); |
| | | service.clearTable(); |
| | | service.dropTable(); |
| | | int sleepSeconds = 5; |
| | | System.out.println("清除/删除操作完成,"+sleepSeconds+"秒后自动退出程序..."); |
| | | try { |
| | | sleep(sleepSeconds*1000); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.out.println("程序终止"); |
| | | System.exit(1); |
| | | } |
| | | |
| | | } |