admin
2020-10-10 81db7b3b070c003e6f5f0d1c757ab30b6f42c944
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
    }
 
}