70 lines
1.8 KiB
Java
70 lines
1.8 KiB
Java
|
|
package com.nis.web.controller.configuration;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
import javax.servlet.http.HttpServletRequest;
|
||
|
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
|
||
|
|
import org.springframework.stereotype.Controller;
|
||
|
|
import org.springframework.ui.Model;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
|
||
|
|
import com.nis.domain.FunctionServiceDict;
|
||
|
|
import com.nis.domain.Page;
|
||
|
|
import com.nis.domain.configuration.CfgIndexInfo;
|
||
|
|
import com.nis.util.Constants;
|
||
|
|
import com.nis.util.DictUtils;
|
||
|
|
import com.nis.web.controller.BaseController;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 配置全量同步
|
||
|
|
* @author zhangwei
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
@Controller
|
||
|
|
@RequestMapping("${adminPath}/config/synchronization")
|
||
|
|
public class ConfigSynchronizationController extends BaseController {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 下发同步命令
|
||
|
|
*/
|
||
|
|
@RequestMapping(value = {"cmd"})
|
||
|
|
public String cmd(Model model,String cmd){
|
||
|
|
|
||
|
|
return "";
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 下发同步配置
|
||
|
|
*/
|
||
|
|
@RequestMapping(value = {"send"})
|
||
|
|
public void send(Model model,HttpServletRequest request,HttpServletResponse response){
|
||
|
|
try {
|
||
|
|
configSynchronizationService.send(request,response,null);
|
||
|
|
} catch (NoSuchFieldException e) {
|
||
|
|
// TODO Auto-generated catch block
|
||
|
|
e.printStackTrace();
|
||
|
|
} catch (SecurityException e) {
|
||
|
|
// TODO Auto-generated catch block
|
||
|
|
e.printStackTrace();
|
||
|
|
} catch (IllegalArgumentException e) {
|
||
|
|
// TODO Auto-generated catch block
|
||
|
|
e.printStackTrace();
|
||
|
|
} catch (IllegalAccessException e) {
|
||
|
|
// TODO Auto-generated catch block
|
||
|
|
e.printStackTrace();
|
||
|
|
} catch (ClassNotFoundException e) {
|
||
|
|
// TODO Auto-generated catch block
|
||
|
|
e.printStackTrace();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
/**
|
||
|
|
* 同步状态获取
|
||
|
|
*/
|
||
|
|
@RequestMapping(value = {"getStatus"})
|
||
|
|
public String getStatus(Model model){
|
||
|
|
|
||
|
|
return "";
|
||
|
|
}
|
||
|
|
}
|