package com.yeshi.buwan.job;
|
|
import com.xxl.job.core.biz.model.ReturnT;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
import org.springframework.stereotype.Component;
|
import org.yeshi.utils.LinuxRemoteCommandUtil;
|
|
|
/**
|
* @author Administrator
|
*/
|
@Component
|
public class SolrJob {
|
|
@XxlJob("solr-watch")
|
public ReturnT<String> reStartSolr(String param) throws Exception {
|
String solrIP = "172.16.16.12";
|
String serverAccount = "root";
|
String serverPwd = "Yeshi2016@";
|
LinuxRemoteCommandUtil.execute(solrIP, serverAccount, serverPwd, param);
|
return ReturnT.SUCCESS;
|
}
|
|
}
|