@RequestMapping(value = "/admin/views/save")
public @ResponseBody
WebResult createView(HttpEntity<View> entity, ModelMap map) {
WebResult result=new WebResult();
try{
View view=entity.getBody();
Assert.isTrue(view.getName().length() > 0,"name should not be null");
logger.debug("save view ={}",view);
viewService.saveView(view);
} catch (Exception e){
result.setSuccess(false);
result.setMessage(e.getMessage());