This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nezha-nz-transfer/src/main/java/com/nis/handler/AfterHandler.java

37 lines
848 B
Java
Raw Normal View History

2021-05-08 19:33:06 +08:00
package com.nis.handler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import cn.hutool.log.Log;
/**
* 此类用于数据同步完成后 清除无用表
* @author admin
*
*/
@Component
@Order(3)
public class AfterHandler implements CommandLineRunner {
private Log log = Log.get();
@Autowired
private SqlHandler sqlHandler;
@Override
public void run(String... args) throws Exception {
2021-05-12 15:56:47 +08:00
sqlHandler.removeColumn();
log.info("remove column successful");
2021-05-08 19:33:06 +08:00
sqlHandler.removeCopy();
log.info("remove table successful");
2021-05-08 19:33:06 +08:00
log.info("-----------------transfer data success-----------------------");
}
}