| | |
| | | SpringApplication.run(Application.class,args); |
| | | ApplicationContext applicationContext = SpringUtil.getApplicationContext(); |
| | | ClearTableService service = (ClearTableService) applicationContext.getBean("clearTableService"); |
| | | service.clearTable(); |
| | | service.dropTable(); |
| | | //service.clearTable(); |
| | | //service.dropTable(); |
| | | int sleepSeconds = 5; |
| | | System.out.println("清除/删除操作完成,"+sleepSeconds+"秒后自动退出程序..."); |
| | | try { |
| | |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://localhost:3360/db_3.5mw_web?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true |
| | | url: jdbc:mysql://localhost:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true |
| | | # url: jdbc:mysql://192.168.10.71:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true |
| | | # url: jdbc:mysql://192.168.10.221:3360?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true |
| | | # url: jdbc:mysql://192.168.10.222:3360/db_user?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true |